Skip to content

Commit ffda217

Browse files
committed
nfsd: shut down the NFSv4 state objects before the filecache
Bugzilla: https://bugzilla.redhat.com/2138605 commit 789e1e1 Author: Jeff Layton <jlayton@kernel.org> Date: Thu Dec 22 09:51:30 2022 -0500 nfsd: shut down the NFSv4 state objects before the filecache Currently, we shut down the filecache before trying to clean up the stateids that depend on it. This leads to the kernel trying to free an nfsd_file twice, and a refcount overput on the nf_mark. Change the shutdown procedure to tear down all of the stateids prior to shutting down the filecache. Reported-and-tested-by: Wang Yugui <wangyugui@e16-tech.com> Signed-off-by: Jeff Layton <jlayton@kernel.org> Fixes: 5e11322 ("nfsd: nfsd_file cache entries should be per net namespace") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Jeffrey Layton <jlayton@redhat.com>
1 parent 4e80ef3 commit ffda217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfsd/nfssvc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ static void nfsd_shutdown_net(struct net *net)
447447
{
448448
struct nfsd_net *nn = net_generic(net, nfsd_net_id);
449449

450-
nfsd_file_cache_shutdown_net(net);
451450
nfs4_state_shutdown_net(net);
451+
nfsd_file_cache_shutdown_net(net);
452452
if (nn->lockd_up) {
453453
lockd_down(net);
454454
nn->lockd_up = false;

0 commit comments

Comments
 (0)