Author: rmacklem
Date: Tue Nov 20 01:52:45 2018
New Revision: 340661
URL: https://svnweb.freebsd.org/changeset/base/340661

Log:
  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:
  head/sys/fs/nfsserver/nfs_nfsdsocket.c

Modified: head/sys/fs/nfsserver/nfs_nfsdsocket.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdsocket.c      Tue Nov 20 01:12:21 2018        
(r340660)
+++ head/sys/fs/nfsserver/nfs_nfsdsocket.c      Tue Nov 20 01:52:45 2018        
(r340661)
@@ -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)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to