* [PATCH] NFS: restore module put when manager exits.
@ 2022-06-23 4:47 NeilBrown
2022-06-23 20:11 ` Chuck Lever III
0 siblings, 1 reply; 2+ messages in thread
From: NeilBrown @ 2022-06-23 4:47 UTC (permalink / raw)
To: Trond Myklebust, Anna Schumaker; +Cc: Chuck Lever III, linux-nfs
Commit f49169c97fce ("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: f49169c97fce ("NFSD: Remove svc_serv_ops::svo_module")
Signed-off-by: NeilBrown <neilb@suse.de>
---
fs/nfs/nfs4state.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 2540b35ec187..9bab3e9c702a 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2753,5 +2753,6 @@ static int nfs4_run_state_manager(void *ptr)
goto again;
nfs_put_client(clp);
+ module_put_and_kthread_exit(0);
return 0;
}
--
2.36.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFS: restore module put when manager exits.
2022-06-23 4:47 [PATCH] NFS: restore module put when manager exits NeilBrown
@ 2022-06-23 20:11 ` Chuck Lever III
0 siblings, 0 replies; 2+ messages in thread
From: Chuck Lever III @ 2022-06-23 20:11 UTC (permalink / raw)
To: Neil Brown; +Cc: Trond Myklebust, Anna Schumaker, Linux NFS Mailing List
> On Jun 23, 2022, at 12:47 AM, NeilBrown <neilb@suse.de> wrote:
>
>
> Commit f49169c97fce ("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: f49169c97fce ("NFSD: Remove svc_serv_ops::svo_module")
> Signed-off-by: NeilBrown <neilb@suse.de>
The fix seems correct to me. I can't remember why I thought this
particular module_put_and_kthread_exit() call site needed to go.
> ---
> fs/nfs/nfs4state.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> index 2540b35ec187..9bab3e9c702a 100644
> --- a/fs/nfs/nfs4state.c
> +++ b/fs/nfs/nfs4state.c
> @@ -2753,5 +2753,6 @@ static int nfs4_run_state_manager(void *ptr)
> goto again;
>
> nfs_put_client(clp);
> + module_put_and_kthread_exit(0);
> return 0;
> }
> --
> 2.36.1
>
--
Chuck Lever
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-23 20:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 4:47 [PATCH] NFS: restore module put when manager exits NeilBrown
2022-06-23 20:11 ` Chuck Lever III
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.