Skip to content

Commit 8709b10

Browse files
jtlaytonSasha Levin
authored and
Sasha Levin
committed
nfsd: fix refcount leak when file is unhashed after being found
[ Upstream commit 8a79261 ] 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: c659336 ("nfsd: don't kill nfsd_files because of lease break error") Signed-off-by: Jeff Layton <[email protected]> Tested-by: Youzhong Yang <[email protected]> Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 5253fd5 commit 8709b10

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfsd/filecache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,7 @@ nfsd_file_do_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
10541054
status = nfserr_jukebox;
10551055
goto construction_err;
10561056
}
1057+
nfsd_file_put(nf);
10571058
open_retry = false;
10581059
goto retry;
10591060
}

0 commit comments

Comments
 (0)