]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nfsd: fix refcount leak when file is unhashed after being found
authorJeff Layton <jlayton@kernel.org>
Wed, 10 Jul 2024 13:05:32 +0000 (09:05 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 1 Sep 2024 14:04:54 +0000 (10:04 -0400)
commit8a7926176378460e0d91e02b03f0ff20a8709a60
tree5643739511450b1a7d3bfdda7232f2725f009c65
parent81a95c2b1d605743220f28db04b8da13a65c4059
nfsd: fix refcount leak when file is unhashed after being found

If we wait_for_construction and find that the file is no longer hashed,
and we're going to retry the open, the old nfsd_file reference is
currently leaked. Put the reference before retrying.

Fixes: c6593366c0bf ("nfsd: don't kill nfsd_files because of lease break error")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Tested-by: Youzhong Yang <youzhong@gmail.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/filecache.c