Commit b2ff1bd7 authored by Jeff Layton's avatar Jeff Layton Committed by Chuck Lever

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: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent b680cb9b
...@@ -382,10 +382,8 @@ nfsd_file_free(struct nfsd_file *nf) ...@@ -382,10 +382,8 @@ nfsd_file_free(struct nfsd_file *nf)
if (nf->nf_mark) if (nf->nf_mark)
nfsd_file_mark_put(nf->nf_mark); nfsd_file_mark_put(nf->nf_mark);
if (nf->nf_file) { if (nf->nf_file) {
get_file(nf->nf_file);
filp_close(nf->nf_file, NULL);
nfsd_file_check_write_error(nf); nfsd_file_check_write_error(nf);
fput(nf->nf_file); filp_close(nf->nf_file, NULL);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment