Skip to content

Commit

Permalink
nfsd4: mask out non-access bits in nfs4_access_to_omode
Browse files Browse the repository at this point in the history
This fixes an unnecessary BUG().

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
J. Bruce Fields committed Sep 2, 2010
1 parent f6360ef commit 8f34a43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8f34a43

Please sign in to comment.