Commit 8f34a430ac16d5fbd9d6b383184d35e152f5a963

Authored by J. Bruce Fields
1 parent f6360efb83

nfsd4: mask out non-access bits in nfs4_access_to_omode

This fixes an unnecessary BUG().

Signed-off-by: J. Bruce Fields <bfields@redhat.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -440,7 +440,7 @@
440 440  
441 441 static int nfs4_access_to_omode(u32 access)
442 442 {
443   - switch (access) {
  443 + switch (access & NFS4_SHARE_ACCESS_BOTH) {
444 444 case NFS4_SHARE_ACCESS_READ:
445 445 return O_RDONLY;
446 446 case NFS4_SHARE_ACCESS_WRITE: