Skip to content

Commit f9c3e1b

Browse files
Mike SnitzerAnna Schumaker
authored andcommitted
nfsd: nfsd_file_acquire_local no longer returns GC'd nfsd_file
Now that LOCALIO no longer leans on NFSD's filecache for caching open files (and instead uses NFS client-side open nfsd_file caching) there is no need to use NFSD filecache's GC feature. Avoiding GC will speed up nfsd_file initial opens. Signed-off-by: Mike Snitzer <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Acked-by: Chuck Lever <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent b33f7de commit f9c3e1b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/nfsd/filecache.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,10 +1222,9 @@ nfsd_file_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
12221222
* a file. The security implications of this should be carefully
12231223
* considered before use.
12241224
*
1225-
* The nfsd_file object returned by this API is reference-counted
1226-
* and garbage-collected. The object is retained for a few
1227-
* seconds after the final nfsd_file_put() in case the caller
1228-
* wants to re-use it.
1225+
* The nfsd_file_object returned by this API is reference-counted
1226+
* but not garbage-collected. The object is unhashed after the
1227+
* final nfsd_file_put().
12291228
*
12301229
* Return values:
12311230
* %nfs_ok - @pnf points to an nfsd_file with its reference
@@ -1247,7 +1246,7 @@ nfsd_file_acquire_local(struct net *net, struct svc_cred *cred,
12471246
__be32 beres;
12481247

12491248
beres = nfsd_file_do_acquire(NULL, net, cred, client,
1250-
fhp, may_flags, NULL, pnf, true);
1249+
fhp, may_flags, NULL, pnf, false);
12511250
revert_creds(save_cred);
12521251
return beres;
12531252
}

0 commit comments

Comments
 (0)