git: 8c6a6e8c8071 - stable/13 - nfsd: Get rid of useless "pool" field in nfs_fha_new.c

From: Rick Macklem <rmacklem_at_FreeBSD.org>
Date: Tue, 16 May 2023 21:37:11 UTC
The branch stable/13 has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=8c6a6e8c8071eb1bcd83f283d26b1aec69e9f76f

commit 8c6a6e8c8071eb1bcd83f283d26b1aec69e9f76f
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2023-02-17 15:34:40 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2023-05-16 21:36:22 +0000

    nfsd: Get rid of useless "pool" field in nfs_fha_new.c
    
    Since svcpool_create() is now called from an initialization function,
    the pool field of fha_params is always non-NULL, so just get
    rid of it and the useless check for it being NULL.
    
    (cherry picked from commit b99c419587db2ac75b929637f61ec3b845d7b5f6)
---
 sys/fs/nfsserver/nfs_fha_new.c | 9 ---------
 sys/fs/nfsserver/nfs_fha_new.h | 1 -
 2 files changed, 10 deletions(-)

diff --git a/sys/fs/nfsserver/nfs_fha_new.c b/sys/fs/nfsserver/nfs_fha_new.c
index 59933ef01bd4..05a03bee5d1c 100644
--- a/sys/fs/nfsserver/nfs_fha_new.c
+++ b/sys/fs/nfsserver/nfs_fha_new.c
@@ -62,8 +62,6 @@ SYSCTL_DECL(_vfs_nfsd);
 
 extern int newnfs_nfsv3_procid[];
 
-NFSD_VNET_DECLARE(SVCPOOL *, nfsrvd_pool);
-
 SYSINIT(nfs_fhanew, SI_SUB_ROOT_CONF, SI_ORDER_ANY, fhanew_init, NULL);
 SYSUNINIT(nfs_fhanew, SI_SUB_ROOT_CONF, SI_ORDER_ANY, fhanew_uninit, NULL);
 
@@ -80,8 +78,6 @@ fhanew_init(void *foo)
 	snprintf(softc->server_name, sizeof(softc->server_name),
 	    FHANEW_SERVER_NAME);
 
-	softc->pool = &NFSD_VNET(nfsrvd_pool);
-
 	/*
 	 * Initialize the sysctl context list for the fha module.
 	 */
@@ -656,11 +652,6 @@ fhenew_stats_sysctl(SYSCTL_HANDLER_ARGS)
 
 	sbuf_new(&sb, NULL, 65536, SBUF_FIXEDLEN);
 
-	if (!*softc->pool) {
-		sbuf_printf(&sb, "NFSD not running\n");
-		goto out;
-	}
-
 	for (i = 0; i < FHA_HASH_SIZE; i++)
 		if (!LIST_EMPTY(&softc->fha_hash[i].list))
 			break;
diff --git a/sys/fs/nfsserver/nfs_fha_new.h b/sys/fs/nfsserver/nfs_fha_new.h
index 7d437e7a0853..08f52539450e 100644
--- a/sys/fs/nfsserver/nfs_fha_new.h
+++ b/sys/fs/nfsserver/nfs_fha_new.h
@@ -99,7 +99,6 @@ struct fha_params {
 	struct sysctl_oid *sysctl_tree;
 	struct fha_ctls ctls;
 	char server_name[32];
-	SVCPOOL **pool;
 };
 
 SVCTHREAD *fhanew_assign(SVCTHREAD *this_thread, struct svc_req *req);