Skip to content

Commit

Permalink
NFS: restore module put when manager exits.
Browse files Browse the repository at this point in the history
Commit f49169c ("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: f49169c ("NFSD: Remove svc_serv_ops::svo_module")
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
neilbrown authored and amschuma-ntap committed Jun 30, 2022
1 parent 03c765b commit 080abad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 080abad

Please sign in to comment.