aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2/acl.c')
-rw-r--r--fs/ext2/acl.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c
index 2bcc0431bada..abea5a17c764 100644
--- a/fs/ext2/acl.c
+++ b/fs/ext2/acl.c
@@ -232,10 +232,17 @@ ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
232} 232}
233 233
234int 234int
235ext2_check_acl(struct inode *inode, int mask) 235ext2_check_acl(struct inode *inode, int mask, unsigned int flags)
236{ 236{
237 struct posix_acl *acl = ext2_get_acl(inode, ACL_TYPE_ACCESS); 237 struct posix_acl *acl;
238
239 if (flags & IPERM_FLAG_RCU) {
240 if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
241 return -ECHILD;
242 return -EAGAIN;
243 }
238 244
245 acl = ext2_get_acl(inode, ACL_TYPE_ACCESS);
239 if (IS_ERR(acl)) 246 if (IS_ERR(acl))
240 return PTR_ERR(acl); 247 return PTR_ERR(acl);
241 if (acl) { 248 if (acl) {
@@ -399,7 +406,7 @@ ext2_xattr_set_acl(struct dentry *dentry, const char *name, const void *value,
399 return -EINVAL; 406 return -EINVAL;
400 if (!test_opt(dentry->d_sb, POSIX_ACL)) 407 if (!test_opt(dentry->d_sb, POSIX_ACL))
401 return -EOPNOTSUPP; 408 return -EOPNOTSUPP;
402 if (!is_owner_or_cap(dentry->d_inode)) 409 if (!inode_owner_or_capable(dentry->d_inode))
403 return -EPERM; 410 return -EPERM;
404 411
405 if (value) { 412 if (value) {