From: J. Bruce Fields Date: Thu, 2 Sep 2010 19:23:16 +0000 (-0400) Subject: nfsd4: mask out non-access bits in nfs4_access_to_omode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8f34a430ac16d5fbd9d6b383184d35e152f5a963;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git nfsd4: mask out non-access bits in nfs4_access_to_omode This fixes an unnecessary BUG(). Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 3dfef0623968..cf0d2ffb3c84 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -440,7 +440,7 @@ test_share(struct nfs4_stateid *stp, struct nfsd4_open *open) { static int nfs4_access_to_omode(u32 access) { - switch (access) { + switch (access & NFS4_SHARE_ACCESS_BOTH) { case NFS4_SHARE_ACCESS_READ: return O_RDONLY; case NFS4_SHARE_ACCESS_WRITE: