]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: Revert "NFSD: NFSv4 CLOSE should release an nfsd_file immediately"
authorChuck Lever <chuck.lever@oracle.com>
Fri, 28 Oct 2022 14:46:44 +0000 (10:46 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:25 +0000 (11:58 +0100)
commit7e62e0d3682114817ae3d36078b862489125bb01
treed822d5d5af51a01e635a4a47c58230384c7d3138
parentc189311a9c79cb7ab6dd4d5dc92131183d5cfad2
NFSD: Revert "NFSD: NFSv4 CLOSE should release an nfsd_file immediately"

[ Upstream commit dcf3f80965ca787c70def402cdf1553c93c75529 ]

This reverts commit a08f29b107d0f9a2165ebdee1b9ee033dc88395a.

That commit attempted to make files available to other users as soon
as all NFSv4 clients were done with them, rather than waiting until
the filecache LRU had garbage collected them.

It gets the reference counting wrong, for one thing.

But it also misses that DELEGRETURN should release a file in the
same fashion. In fact, any nfsd_file_put() on an file held open
by an NFSv4 client needs potentially to release the file
immediately...

Clear the way for implementing that idea.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Stable-dep-of: 0b3a551fa58b ("nfsd: fix handling of cached open files in nfsd4_open codepath")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/filecache.c
fs/nfsd/filecache.h
fs/nfsd/nfs4state.c