svn commit: r324543 - stable/10/sys/fs/nfsclient

Rick Macklem rmacklem at FreeBSD.org
Wed Oct 11 23:21:25 UTC 2017


Author: rmacklem
Date: Wed Oct 11 23:21:24 2017
New Revision: 324543
URL: https://svnweb.freebsd.org/changeset/base/324543

Log:
  MFC: r323689
  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.

Modified:
  stable/10/sys/fs/nfsclient/nfs_clrpcops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/10/sys/fs/nfsclient/nfs_clrpcops.c	Wed Oct 11 21:53:53 2017	(r324542)
+++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c	Wed Oct 11 23:21:24 2017	(r324543)
@@ -5766,7 +5766,7 @@ nfscl_doflayoutio(vnode_t vp, struct uio *uiop, int *i
 				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 {


More information about the svn-src-stable mailing list