From: NeilBrown Date: Thu, 23 Jun 2022 04:47:34 +0000 (+1000) Subject: NFS: restore module put when manager exits. X-Git-Tag: baikal/mips/sdk6.1~5388^2~1 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=569cbb2c9796d82fc480bd694c85286e008c0dd4;p=kernel.git NFS: restore module put when manager exits. Commit f0f8648589e6 ("NFSD: Remove svc_serv_ops::svo_module") removed calls to module_put_and_kthread_exit() from threads that acted as SUNRPC servers and had a related svc_serv_ops structure. This was correct. It ALSO removed the module_put_and_kthread_exit() call from nfs4_run_state_manager() which is NOT a SUNRPC service. Consequently every time the NFSv4 state manager runs the module count increments and won't be decremented. So the nfsv4 module cannot be unloaded. So restore the module_put_and_kthread_exit() call. Fixes: f0f8648589e6 ("NFSD: Remove svc_serv_ops::svo_module") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 2540b35ec1870..9bab3e9c702a4 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -2753,5 +2753,6 @@ again: goto again; nfs_put_client(clp); + module_put_and_kthread_exit(0); return 0; }