diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-04-10 10:35:12 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-04-11 08:42:03 -0400 |
commit | aea93397db4b39c9d15443a0e7cc9a380ba990c6 (patch) | |
tree | fe98a2b9f48b814c0d911d5ff1d700a7465f40d3 /fs/nfsd/vfs.c | |
parent | 8985ef0b8af895c3b85a8c1b7108e0169fcbd20b (diff) | |
download | linux-3.10-aea93397db4b39c9d15443a0e7cc9a380ba990c6.tar.gz linux-3.10-aea93397db4b39c9d15443a0e7cc9a380ba990c6.tar.bz2 linux-3.10-aea93397db4b39c9d15443a0e7cc9a380ba990c6.zip |
nfsd: distinguish functions of NFSD_MAY_* flags
Most of the NFSD_MAY_* flags actually request permissions, but over the
years we've accreted a few that modify the behavior of the permission or
open code in other ways.
Distinguish the two cases a little more. In particular, allow the
shortcut at the start of nfsd_permission to ignore the
non-permission-requesting bits.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 2e1cebde90d..a76ef7e0b3d 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -2027,7 +2027,7 @@ nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp, struct inode *inode = dentry->d_inode; int err; - if (acc == NFSD_MAY_NOP) + if ((acc & NFSD_MAY_MASK) == NFSD_MAY_NOP) return 0; #if 0 dprintk("nfsd: permission 0x%x%s%s%s%s%s%s%s mode 0%o%s%s%s\n", |