Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Sep 2019 23:39:31 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r352026 - projects/nfsv42/sys/fs/nfsclient
Message-ID:  <201909072339.x87NdVEw085960@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sat Sep  7 23:39:30 2019
New Revision: 352026
URL: https://svnweb.freebsd.org/changeset/base/352026

Log:
  Make an obvious simplification of an "if" expression.
  
  An "if" expression committed as r352024 can obviously be simplified without
  changing the semantics. This patch does that.
  Found by code inspection.

Modified:
  projects/nfsv42/sys/fs/nfsclient/nfs_clrpcops.c

Modified: projects/nfsv42/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- projects/nfsv42/sys/fs/nfsclient/nfs_clrpcops.c	Sat Sep  7 21:49:01 2019	(r352025)
+++ projects/nfsv42/sys/fs/nfsclient/nfs_clrpcops.c	Sat Sep  7 23:39:30 2019	(r352026)
@@ -4779,9 +4779,8 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc
 	/* Fill in fore channel attributes. */
 	NFSM_BUILD(tl, uint32_t *, 7 * NFSX_UNSIGNED);
 	*tl++ = 0;				/* Header pad size */
-	if ((nd->nd_flag & ND_NFSV42) != 0 && mds != 0 &&
-	    sb_max_adj - NFS_MAXXDR > nmp->nm_wsize - NFS_MAXXDR &&
-	    sb_max_adj - NFS_MAXXDR > nmp->nm_rsize - NFS_MAXXDR) {
+	if ((nd->nd_flag & ND_NFSV42) != 0 && mds != 0 && sb_max_adj >=
+	    nmp->nm_wsize && sb_max_adj >= nmp->nm_rsize) {
 		/*
 		 * NFSv4.2 Extended Attribute operations may want to do
 		 * requests/replies that are larger than nm_rsize/nm_wsize.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909072339.x87NdVEw085960>