diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-01-16 21:21:04 +0000 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-01-16 21:21:04 +0000 |
commit | f652f6c5b7cfdf139f4155d78f397e99ae1c4acc (patch) | |
tree | 71c6344688bf56ea6aaf18c586ab69ff4f077ade /fs/generic_acl.c | |
parent | 140e3008e7fe1526cbb12f8f07dbc273ac713b75 (diff) | |
parent | c66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5 (diff) | |
download | kernel_goldelico_gta04-f652f6c5b7cfdf139f4155d78f397e99ae1c4acc.zip kernel_goldelico_gta04-f652f6c5b7cfdf139f4155d78f397e99ae1c4acc.tar.gz kernel_goldelico_gta04-f652f6c5b7cfdf139f4155d78f397e99ae1c4acc.tar.bz2 |
Merge branch 'master' of /pub/scm/linux/kernel/git/jejb/scsi-post-merge-2.6 into for-linus
Diffstat (limited to 'fs/generic_acl.c')
-rw-r--r-- | fs/generic_acl.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/fs/generic_acl.c b/fs/generic_acl.c index 6bc9e3a..06c48a8 100644 --- a/fs/generic_acl.c +++ b/fs/generic_acl.c @@ -190,14 +190,20 @@ generic_acl_chmod(struct inode *inode) } int -generic_check_acl(struct inode *inode, int mask) +generic_check_acl(struct inode *inode, int mask, unsigned int flags) { - struct posix_acl *acl = get_cached_acl(inode, ACL_TYPE_ACCESS); - - if (acl) { - int error = posix_acl_permission(inode, acl, mask); - posix_acl_release(acl); - return error; + if (flags & IPERM_FLAG_RCU) { + if (!negative_cached_acl(inode, ACL_TYPE_ACCESS)) + return -ECHILD; + } else { + struct posix_acl *acl; + + acl = get_cached_acl(inode, ACL_TYPE_ACCESS); + if (acl) { + int error = posix_acl_permission(inode, acl, mask); + posix_acl_release(acl); + return error; + } } return -EAGAIN; } |