Linux 4.8 compat: posix_acl_valid()

The posix_acl_valid() function has been updated to require a
user namespace.  Filesystem callers should normally provide the
user_ns from the super block associcated with the ACL; the
zpl_posix_acl_valid() wrapper has been added for this purpose.
See https://github.com/torvalds/linux/commit/0d4d717f for
complete details.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #4922
This commit is contained in:
Brian Behlendorf
2016-08-02 11:11:45 -07:00
parent e85a6396b0
commit 4b908d3220
4 changed files with 39 additions and 2 deletions
+2 -2
View File
@@ -1288,7 +1288,7 @@ __zpl_xattr_acl_set_access(struct inode *ip, const char *name,
if (IS_ERR(acl))
return (PTR_ERR(acl));
else if (acl) {
error = posix_acl_valid(acl);
error = zpl_posix_acl_valid(ip, acl);
if (error) {
zpl_posix_acl_release(acl);
return (error);
@@ -1328,7 +1328,7 @@ __zpl_xattr_acl_set_default(struct inode *ip, const char *name,
if (IS_ERR(acl))
return (PTR_ERR(acl));
else if (acl) {
error = posix_acl_valid(acl);
error = zpl_posix_acl_valid(ip, acl);
if (error) {
zpl_posix_acl_release(acl);
return (error);