From: Jeff Layton Date: Thu, 22 Dec 2022 14:51:30 +0000 (-0500) Subject: nfsd: shut down the NFSv4 state objects before the filecache X-Git-Tag: v6.6.17~5595^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=789e1e10f214c00ca18fc6610824c5b9876ba5f2;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Jeff Layton Fixes: 5e113224c17e ("nfsd: nfsd_file cache entries should be per net namespace") Signed-off-by: Chuck Lever --- diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 56fba1c..325d3d3 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -453,8 +453,8 @@ static void nfsd_shutdown_net(struct net *net) { struct nfsd_net *nn = net_generic(net, nfsd_net_id); - nfsd_file_cache_shutdown_net(net); nfs4_state_shutdown_net(net); + nfsd_file_cache_shutdown_net(net); if (nn->lockd_up) { lockd_down(net); nn->lockd_up = false;