nfscommon: Revert use of nfsstatsv1_p in nfs_commonkrpc.c

Commit 9d329bbc9a converted a lot of accesses to nfsstatsv1
to use nfsstatsv1_p instead.  However, the accesses in
nfs_commonkrpc.c are for client side and should not be
converted.  This patch puts them back in the correct
pre-commit 9d329bbc9a form.

MFC after:	3 months
This commit is contained in:
Rick Macklem 2023-02-16 17:44:19 -08:00
parent a1ffc2fe9c
commit a63b5d488b

View File

@ -92,6 +92,7 @@ NFSSTATESPINLOCK;
NFSREQSPINLOCK;
NFSDLOCKMUTEX;
NFSCLSTATEMUTEX;
extern struct nfsstatsv1 nfsstatsv1;
extern struct nfsreqhead nfsd_reqq;
extern int nfscl_ticks;
extern void (*ncl_call_invalcaches)(struct vnode *);
@ -99,8 +100,6 @@ extern int nfs_numnfscbd;
extern int nfscl_debuglevel;
extern int nfsrv_lease;
NFSD_VNET_DECLARE(struct nfsstatsv1 *, nfsstatsv1_p);
SVCPOOL *nfscbd_pool;
int nfs_bufpackets = 4;
static int nfsrv_gsscallbackson = 0;
@ -783,7 +782,7 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
procnum = NFSV4PROC_COMPOUND;
if (nmp != NULL) {
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcrequests);
NFSINCRGLOBAL(nfsstatsv1.rpcrequests);
/* Map the procnum to the old NFSv2 one, as required. */
if ((nd->nd_flag & ND_NFSV2) != 0) {
@ -918,13 +917,13 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
if (stat == RPC_SUCCESS) {
error = 0;
} else if (stat == RPC_TIMEDOUT) {
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpctimeouts);
NFSINCRGLOBAL(nfsstatsv1.rpctimeouts);
error = ETIMEDOUT;
} else if (stat == RPC_VERSMISMATCH) {
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid);
NFSINCRGLOBAL(nfsstatsv1.rpcinvalid);
error = EOPNOTSUPP;
} else if (stat == RPC_PROGVERSMISMATCH) {
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid);
NFSINCRGLOBAL(nfsstatsv1.rpcinvalid);
error = EPROTONOSUPPORT;
} else if (stat == RPC_CANTSEND || stat == RPC_CANTRECV ||
stat == RPC_SYSTEMERROR || stat == RPC_INTR) {
@ -958,11 +957,11 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
if (stat == RPC_INTR)
error = EINTR;
else {
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid);
NFSINCRGLOBAL(nfsstatsv1.rpcinvalid);
error = ENXIO;
}
} else {
NFSINCRGLOBAL(NFSD_VNET(nfsstatsv1_p)->rpcinvalid);
NFSINCRGLOBAL(nfsstatsv1.rpcinvalid);
error = EACCES;
}
if (error) {