OSDN Git Service

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)
committerChuck Lever <chuck.lever@oracle.com>
Thu, 22 Dec 2022 15:12:56 +0000 (10:12 -0500)
commit789e1e10f214c00ca18fc6610824c5b9876ba5f2
treee7adfba4078f67bca202c42e7b1845686b7d2619
parent75333d48f92256a0dec91dbf07835e804fc411c0
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: 5e113224c17e ("nfsd: nfsd_file cache entries should be per net namespace")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfssvc.c