Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f34a430 authored by J. Bruce Fields's avatar J. Bruce Fields
Browse files

nfsd4: mask out non-access bits in nfs4_access_to_omode



This fixes an unnecessary BUG().

Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent f6360efb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -440,7 +440,7 @@ test_share(struct nfs4_stateid *stp, struct nfsd4_open *open) {


static int nfs4_access_to_omode(u32 access)
static int nfs4_access_to_omode(u32 access)
{
{
	switch (access) {
	switch (access & NFS4_SHARE_ACCESS_BOTH) {
	case NFS4_SHARE_ACCESS_READ:
	case NFS4_SHARE_ACCESS_READ:
		return O_RDONLY;
		return O_RDONLY;
	case NFS4_SHARE_ACCESS_WRITE:
	case NFS4_SHARE_ACCESS_WRITE: