]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSD: Mark filecache "down" if init fails
authorChuck Lever <chuck.lever@oracle.com>
Sat, 21 Sep 2024 18:25:37 +0000 (14:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:53 +0000 (15:11 +0200)
commitca5b42375bb8a65919f8b930cbe1b8331db4a750
treef9c35d644f925f72fdeacee24c710e6fd5042959
parente0e14dd35d4242340c7346aac60c7ff8fbf87ffc
NFSD: Mark filecache "down" if init fails

[ Upstream commit dc0d0f885aa422f621bc1c2124133eff566b0bc8 ]

NeilBrown says:
> The handling of NFSD_FILE_CACHE_UP is strange.  nfsd_file_cache_init()
> sets it, but doesn't clear it on failure.  So if nfsd_file_cache_init()
> fails for some reason, nfsd_file_cache_shutdown() would still try to
> clean up if it was called.

Reported-by: NeilBrown <neilb@suse.de>
Fixes: c7b824c3d06c ("NFSD: Replace the "init once" mechanism")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/filecache.c