diff options
author | Chunwei Chen <[email protected]> | 2016-11-01 17:19:52 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-02-03 10:24:50 -0800 |
commit | c09af45f7b85f4a6dfeb4effcf8c9ae546ff9afe (patch) | |
tree | b5b1f9d1b80dd4c2b6be5e6f4c84bb48eec1fedf /include | |
parent | 64c259c509495cfd265e2fab8108352a6a8555c4 (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')
-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 b37c1d45b..2350fa506 100644 --- a/include/linux/vfs_compat.h +++ b/include/linux/vfs_compat.h @@ -204,13 +204,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 @@ -222,7 +217,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; @@ -252,7 +252,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 |