diff options
author | Chuck Lever | 2022-10-28 10:46:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-01-18 11:58:25 +0100 |
commit | 1c36dc563e1c9649b040c2af00355b21d905a958 (patch) | |
tree | ef051fbe8c466c51b208fecb6998473631d0714f /fs/direct-io.c | |
parent | 7e4d3d500458aec3bb58c9429999dd040077326b (diff) |
NFSD: Add an NFSD_FILE_GC flag to enable nfsd_file garbage collection
[ Upstream commit 4d1ea8455716ca070e3cd85767e6f6a562a58b1b ]
NFSv4 operations manage the lifetime of nfsd_file items they use by
means of NFSv4 OPEN and CLOSE. Hence there's no need for them to be
garbage collected.
Introduce a mechanism to enable garbage collection for nfsd_file
items used only by NFSv2/3 callers.
Note that the change in nfsd_file_put() ensures that both CLOSE and
DELEGRETURN will actually close out and free an nfsd_file on last
reference of a non-garbage-collected file.
Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=394
Suggested-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Stable-dep-of: 0b3a551fa58b ("nfsd: fix handling of cached open files in nfsd4_open codepath")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/direct-io.c')
0 files changed, 0 insertions, 0 deletions