Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9c551d8 authored by Jeff Layton's avatar Jeff Layton Committed by Greg Kroah-Hartman
Browse files

nfsd: shut down the NFSv4 state objects before the filecache



[ Upstream commit 789e1e10f214c00ca18fc6610824c5b9876ba5f2 ]

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: default avatarWang Yugui <wangyugui@e16-tech.com>
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Fixes: 5e113224 ("nfsd: nfsd_file cache entries should be per net namespace")
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7eaaee52
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -420,8 +420,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 = 0;