From: Jeff Layton Date: Wed, 18 Jan 2023 17:31:37 +0000 (-0500) Subject: nfsd: don't take/put an extra reference when putting a file X-Git-Tag: microblaze-v6.6~366^2~36 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=b2ff1bd71db2a1b193a6dde0845adcd69cbcf75e;p=linux-2.6-microblaze.git nfsd: don't take/put an extra reference when putting a file The last thing that filp_close does is an fput, so don't bother taking and putting the extra reference. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever --- diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index 50349449a4e5..51e2947c21a7 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -382,10 +382,8 @@ nfsd_file_free(struct nfsd_file *nf) if (nf->nf_mark) nfsd_file_mark_put(nf->nf_mark); if (nf->nf_file) { - get_file(nf->nf_file); - filp_close(nf->nf_file, NULL); nfsd_file_check_write_error(nf); - fput(nf->nf_file); + filp_close(nf->nf_file, NULL); } /*