aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2016-08-02 11:11:45 -0700
committerBrian Behlendorf <[email protected]>2016-08-08 11:46:40 -0700
commit4b908d32200b6e5c7b5115322b6c8d25e770daa0 (patch)
tree98cf55b1d7583c68664208992ce9d2cca23ad26c /include/linux
parente85a6396b0f7f3cb5a76cf88e47fc1334f9162b7 (diff)
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 <[email protected]> Signed-off-by: Nikolay Borisov <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #4922
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/vfs_compat.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h
index 52c539933..820647d39 100644
--- a/include/linux/vfs_compat.h
+++ b/include/linux/vfs_compat.h
@@ -316,6 +316,18 @@ typedef umode_t zpl_equivmode_t;
#else
typedef mode_t zpl_equivmode_t;
#endif /* HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T */
+
+/*
+ * 4.8 API change,
+ * posix_acl_valid() now must be passed a namespace, the namespace from
+ * from super block associated with the given inode is used for this purpose.
+ */
+#ifdef HAVE_POSIX_ACL_VALID_WITH_NS
+#define zpl_posix_acl_valid(ip, acl) posix_acl_valid(ip->i_sb->s_user_ns, acl)
+#else
+#define zpl_posix_acl_valid(ip, acl) posix_acl_valid(acl)
+#endif
+
#endif /* CONFIG_FS_POSIX_ACL */
/*