From 335da87230353c9ebbdc1819215bc9aa9163e3a1 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Sun, 10 Apr 2011 10:35:12 -0400 Subject: [PATCH] --- yaml --- r: 252816 b: refs/heads/master c: aea93397db4b39c9d15443a0e7cc9a380ba990c6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfsd/vfs.c | 2 +- trunk/fs/nfsd/vfs.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index b20be3b66ed4..6d4673012f30 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8985ef0b8af895c3b85a8c1b7108e0169fcbd20b +refs/heads/master: aea93397db4b39c9d15443a0e7cc9a380ba990c6 diff --git a/trunk/fs/nfsd/vfs.c b/trunk/fs/nfsd/vfs.c index 2e1cebde90df..a76ef7e0b3d0 100644 --- a/trunk/fs/nfsd/vfs.c +++ b/trunk/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", diff --git a/trunk/fs/nfsd/vfs.h b/trunk/fs/nfsd/vfs.h index 9a370a5e36b7..1036913e6e86 100644 --- a/trunk/fs/nfsd/vfs.h +++ b/trunk/fs/nfsd/vfs.h @@ -17,6 +17,9 @@ #define NFSD_MAY_SATTR 8 #define NFSD_MAY_TRUNC 16 #define NFSD_MAY_LOCK 32 +#define NFSD_MAY_MASK 63 + +/* extra hints to permission and open routines: */ #define NFSD_MAY_OWNER_OVERRIDE 64 #define NFSD_MAY_LOCAL_ACCESS 128 /* IRIX doing local access check on device special file*/ #define NFSD_MAY_BYPASS_GSS_ON_ROOT 256