Fix bogus FREAD with NFSV4OPEN_ACCESSREAD. No functional change.

The code in nfscl_doflayoutio() bogusly used FREAD instead of
NFSV4OPEN_ACCESSREAD. Since both happen to be defined as "1", this
worked and the patch doesn't result in a functional change.
Found by inspection during development of Flex File Layout support.

MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2017-09-17 22:18:01 +00:00
parent d11e86549e
commit ccf038250a

View File

@ -5674,7 +5674,7 @@ nfscl_doflayoutio(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
np->n_flag &= ~NDSCOMMIT;
mtx_unlock(&np->n_mtx);
}
} else if (rwflag == FREAD)
} else if (rwflag == NFSV4OPEN_ACCESSREAD)
error = nfsrpc_readds(vp, uiop, stateidp, eofp, *dspp,
io_off, xfer, fhp, cred, p);
else {