Skip to content

Commit 8a79261

Browse files
jtlaytonchucklever
authored andcommitted
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: 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]>
1 parent 81a95c2 commit 8a79261

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
@@ -1051,6 +1051,7 @@ nfsd_file_do_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
10511051
status = nfserr_jukebox;
10521052
goto construction_err;
10531053
}
1054+
nfsd_file_put(nf);
10541055
open_retry = false;
10551056
fh_put(fhp);
10561057
goto retry;

0 commit comments

Comments
 (0)