diff options
author | Chunwei Chen <[email protected]> | 2016-11-01 17:19:52 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-11-07 11:04:44 -0800 |
commit | 3779913b35634d9d34ac9eb709203275b28050c2 (patch) | |
tree | a30b6a62a918bc460e0f256ce1b673f98f24901b /include/linux | |
parent | 8e71ab99dc4a591d41ab0d9255ddca3e914f47e4 (diff) |
Use set_cached_acl and forget_cached_acl when possible
Originally, these two function are inline, so their usability is tied to
posix_acl_release. However, since Linux 3.14, they became EXPORT_SYMBOL, so we
can always use them. In this patch, we create an independent test for these
two functions so we can use them when possible.
Signed-off-by: Chunwei Chen <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/vfs_compat.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h index 6ed5075a3..7a1cb967b 100644 --- a/include/linux/vfs_compat.h +++ b/include/linux/vfs_compat.h @@ -205,13 +205,8 @@ lseek_execute( #include <linux/posix_acl.h> #if defined(HAVE_POSIX_ACL_RELEASE) && !defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY) - #define zpl_posix_acl_release(arg) posix_acl_release(arg) -#define zpl_set_cached_acl(ip, ty, n) set_cached_acl(ip, ty, n) -#define zpl_forget_cached_acl(ip, ty) forget_cached_acl(ip, ty) - #else - void zpl_posix_acl_release_impl(struct posix_acl *); static inline void @@ -223,7 +218,12 @@ zpl_posix_acl_release(struct posix_acl *acl) if (atomic_dec_and_test(&acl->a_refcount)) zpl_posix_acl_release_impl(acl); } +#endif /* HAVE_POSIX_ACL_RELEASE */ +#ifdef HAVE_SET_CACHED_ACL_USABLE +#define zpl_set_cached_acl(ip, ty, n) set_cached_acl(ip, ty, n) +#define zpl_forget_cached_acl(ip, ty) forget_cached_acl(ip, ty) +#else static inline void zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer) { struct posix_acl *older = NULL; @@ -253,7 +253,7 @@ static inline void zpl_forget_cached_acl(struct inode *ip, int type) { zpl_set_cached_acl(ip, type, (struct posix_acl *)ACL_NOT_CACHED); } -#endif /* HAVE_POSIX_ACL_RELEASE */ +#endif /* HAVE_SET_CACHED_ACL_USABLE */ #ifndef HAVE___POSIX_ACL_CHMOD #ifdef HAVE_POSIX_ACL_CHMOD |