summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 120efc76d3d..ec2e5656b44 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -196,20 +196,22 @@ static int check_acl(struct inode *inode, int mask)
acl = get_cached_acl(inode, ACL_TYPE_ACCESS);
/*
- * A filesystem can force a ACL callback by just never
- * filling the ACL cache. But normally you'd fill the
- * cache either at inode instantiation time, or on the
- * first ->check_acl call.
+ * A filesystem can force a ACL callback by just never filling the
+ * ACL cache. But normally you'd fill the cache either at inode
+ * instantiation time, or on the first ->get_acl call.
*
- * If the filesystem doesn't have a check_acl() function
- * at all, we'll just create the negative cache entry.
+ * If the filesystem doesn't have a get_acl() function at all, we'll
+ * just create the negative cache entry.
*/
if (acl == ACL_NOT_CACHED) {
- if (inode->i_op->check_acl)
- return inode->i_op->check_acl(inode, mask);
-
- set_cached_acl(inode, ACL_TYPE_ACCESS, NULL);
- return -EAGAIN;
+ if (inode->i_op->get_acl) {
+ acl = inode->i_op->get_acl(inode, ACL_TYPE_ACCESS);
+ if (IS_ERR(acl))
+ return PTR_ERR(acl);
+ } else {
+ set_cached_acl(inode, ACL_TYPE_ACCESS, NULL);
+ return -EAGAIN;
+ }
}
if (acl) {