diff options
| author | NeilBrown <neilb@suse.de> | 2022-06-23 14:47:34 +1000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-07 17:54:51 +0200 |
| commit | 27dbe019b2bb15c5748300b17913c25a1ae3ff81 (patch) | |
| tree | 7766091f3ccae09893192258e63628537e4aa30c /fs | |
| parent | 05893c61bbd4aecca8452dcb9ce9f9fc337bdc9c (diff) | |
| download | linux-27dbe019b2bb15c5748300b17913c25a1ae3ff81.tar.gz linux-27dbe019b2bb15c5748300b17913c25a1ae3ff81.tar.bz2 linux-27dbe019b2bb15c5748300b17913c25a1ae3ff81.zip | |
NFS: restore module put when manager exits.
commit 080abad71e99d2becf38c978572982130b927a28 upstream.
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>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/nfs/nfs4state.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 9656d40bb488..673af2d4b5a2 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -2743,5 +2743,6 @@ again: goto again; nfs_put_client(clp); + module_put_and_kthread_exit(0); return 0; } |
