Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Feb 2023 15:35:53 GMT
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b99c419587db - main - nfsd: Get rid of useless "pool" field in nfs_fha_new.c
Message-ID:  <202302171535.31HFZr7n026271@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by rmacklem:

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

commit b99c419587db2ac75b929637f61ec3b845d7b5f6
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2023-02-17 15:34:40 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2023-02-17 15:34:40 +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.
    
    MFC after:      3 months
---
 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);



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