summaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-01-18 12:31:37 -0500
committerChuck Lever <chuck.lever@oracle.com>2023-04-26 09:04:59 -0400
commitb2ff1bd71db2a1b193a6dde0845adcd69cbcf75e (patch)
treeecba3c8eec96cde0b2fe713c731cfb7c434ffc83 /fs/nfsd
parentb680cb9b737331aad271feebbedafb865504e234 (diff)
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 <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/filecache.c4
1 files changed, 1 insertions, 3 deletions
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);
}
/*