diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/generic_acl.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/fs/generic_acl.c b/fs/generic_acl.c index 628004282130..06c48a891832 100644 --- a/fs/generic_acl.c +++ b/fs/generic_acl.c | |||
@@ -192,16 +192,18 @@ generic_acl_chmod(struct inode *inode) | |||
192 | int | 192 | int |
193 | generic_check_acl(struct inode *inode, int mask, unsigned int flags) | 193 | generic_check_acl(struct inode *inode, int mask, unsigned int flags) |
194 | { | 194 | { |
195 | struct posix_acl *acl; | 195 | if (flags & IPERM_FLAG_RCU) { |
196 | 196 | if (!negative_cached_acl(inode, ACL_TYPE_ACCESS)) | |
197 | if (flags & IPERM_FLAG_RCU) | 197 | return -ECHILD; |
198 | return -ECHILD; | 198 | } else { |
199 | 199 | struct posix_acl *acl; | |
200 | acl = get_cached_acl(inode, ACL_TYPE_ACCESS); | 200 | |
201 | if (acl) { | 201 | acl = get_cached_acl(inode, ACL_TYPE_ACCESS); |
202 | int error = posix_acl_permission(inode, acl, mask); | 202 | if (acl) { |
203 | posix_acl_release(acl); | 203 | int error = posix_acl_permission(inode, acl, mask); |
204 | return error; | 204 | posix_acl_release(acl); |
205 | return error; | ||
206 | } | ||
205 | } | 207 | } |
206 | return -EAGAIN; | 208 | return -EAGAIN; |
207 | } | 209 | } |