diff options
Diffstat (limited to 'fs/ext4/acl.c')
-rw-r--r-- | fs/ext4/acl.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c index 5e2ed4504ead..21eacd7b7d79 100644 --- a/fs/ext4/acl.c +++ b/fs/ext4/acl.c | |||
@@ -238,10 +238,17 @@ ext4_set_acl(handle_t *handle, struct inode *inode, int type, | |||
238 | } | 238 | } |
239 | 239 | ||
240 | int | 240 | int |
241 | ext4_check_acl(struct inode *inode, int mask) | 241 | ext4_check_acl(struct inode *inode, int mask, unsigned int flags) |
242 | { | 242 | { |
243 | struct posix_acl *acl = ext4_get_acl(inode, ACL_TYPE_ACCESS); | 243 | struct posix_acl *acl; |
244 | |||
245 | if (flags & IPERM_FLAG_RCU) { | ||
246 | if (!negative_cached_acl(inode, ACL_TYPE_ACCESS)) | ||
247 | return -ECHILD; | ||
248 | return -EAGAIN; | ||
249 | } | ||
244 | 250 | ||
251 | acl = ext4_get_acl(inode, ACL_TYPE_ACCESS); | ||
245 | if (IS_ERR(acl)) | 252 | if (IS_ERR(acl)) |
246 | return PTR_ERR(acl); | 253 | return PTR_ERR(acl); |
247 | if (acl) { | 254 | if (acl) { |
@@ -426,7 +433,7 @@ ext4_xattr_set_acl(struct dentry *dentry, const char *name, const void *value, | |||
426 | return -EINVAL; | 433 | return -EINVAL; |
427 | if (!test_opt(inode->i_sb, POSIX_ACL)) | 434 | if (!test_opt(inode->i_sb, POSIX_ACL)) |
428 | return -EOPNOTSUPP; | 435 | return -EOPNOTSUPP; |
429 | if (!is_owner_or_cap(inode)) | 436 | if (!inode_owner_or_capable(inode)) |
430 | return -EPERM; | 437 | return -EPERM; |
431 | 438 | ||
432 | if (value) { | 439 | if (value) { |