mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
nfsd: don't take/put an extra reference when putting a file
[ Upstream commit b2ff1bd71d
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
917dadb09e
commit
c01b3f0fef
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user