From c0fa855ca6a3e811a613a268a7dda5459c43b91e Mon Sep 17 00:00:00 2001 From: rmacklem Date: Thu, 13 Apr 2017 20:16:29 +0000 Subject: [PATCH] Add call to svcpool_close() for the NFSv4 callback pool (svcpool_nfscbd). A function called svcpool_close() was added to the server side krpc by r313735, so that a pool could be closed without destroying the data structures. This little patch adds a call to it for the callback pool (svcpool_nfscbd), so that the nfscbd daemon can be killed/restarted and continue to work correctly. MFC after: 2 weeks --- sys/fs/nfsclient/nfs_clkrpc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/fs/nfsclient/nfs_clkrpc.c b/sys/fs/nfsclient/nfs_clkrpc.c index 8544bf77590..c652ee6ecd6 100644 --- a/sys/fs/nfsclient/nfs_clkrpc.c +++ b/sys/fs/nfsclient/nfs_clkrpc.c @@ -278,6 +278,11 @@ nfsrvd_cbinit(int terminating) while (nfs_numnfscbd > 0) msleep(&nfs_numnfscbd, NFSDLOCKMUTEXPTR, PZERO, "nfscbdt", 0); + if (nfscbd_pool != NULL) { + NFSD_UNLOCK(); + svcpool_close(nfscbd_pool); + NFSD_LOCK(); + } } if (nfscbd_pool == NULL) { -- 2.45.0