]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: shut down the NFSv4 state objects before the filecache
authorJeff Layton <jlayton@kernel.org>
Thu, 22 Dec 2022 14:51:30 +0000 (09:51 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:56 +0000 (11:41 +0100)
commit6754205f95a9fd0e95aa5f2e2413e6e7950f4b85
tree6e68f649cbbd2254e7af81af8ce55e3c80838144
parent7f792aa90c595df281e6e5ba28d7570810e4d24b
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: Wang Yugui <wangyugui@e16-tech.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Fixes: 2a16f2600ccc ("nfsd: nfsd_file cache entries should be per net namespace")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfssvc.c