Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2018 20:29:48 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r340849 - stable/12/sys/fs/nfsserver
Message-ID:  <201811232029.wANKTmsw049589@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Fri Nov 23 20:29:47 2018
New Revision: 340849
URL: https://svnweb.freebsd.org/changeset/base/340849

Log:
  MFC r340661 (rmacklem):
  
  r304026 added code that started statistics gathering for an operation
  before the operation number (the variable called "op") was sanity checked.
  This patch moves the code down to below the range sanity check for "op".

Modified:
  stable/12/sys/fs/nfsserver/nfs_nfsdsocket.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/fs/nfsserver/nfs_nfsdsocket.c
==============================================================================
--- stable/12/sys/fs/nfsserver/nfs_nfsdsocket.c	Fri Nov 23 19:45:57 2018	(r340848)
+++ stable/12/sys/fs/nfsserver/nfs_nfsdsocket.c	Fri Nov 23 20:29:47 2018	(r340849)
@@ -766,11 +766,6 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram
 		*repp = *tl;
 		op = fxdr_unsigned(int, *tl);
 		NFSD_DEBUG(4, "op=%d\n", op);
-
-		binuptime(&start_time);
-		nfsrvd_statstart(op, &start_time);
-		statsinprog = 1;
-
 		if (op < NFSV4OP_ACCESS ||
 		    (op >= NFSV4OP_NOPS && (nd->nd_flag & ND_NFSV41) == 0) ||
 		    (op >= NFSV41_NOPS && (nd->nd_flag & ND_NFSV41) != 0)) {
@@ -782,6 +777,11 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram
 		} else {
 			repp++;
 		}
+
+		binuptime(&start_time);
+		nfsrvd_statstart(op, &start_time);
+		statsinprog = 1;
+
 		if (i == 0)
 			op0 = op;
 		if (i == numops - 1)



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