diff options
author | NeilBrown <neilb@suse.de> | 2022-07-26 08:45:30 +0200 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-08-04 16:28:19 +0200 |
commit | b677c0c63a135a916493c064906582e9f3ed4802 (patch) | |
tree | 37b44bbc131d2bcdd67fadefb9cbad0402b49c88 /fs/nfsd/nfs3proc.c | |
parent | NFSD: change nfsd_create()/nfsd_symlink() to unlock directory before returning. (diff) | |
download | linux-b677c0c63a135a916493c064906582e9f3ed4802.tar.xz linux-b677c0c63a135a916493c064906582e9f3ed4802.zip |
NFSD: always drop directory lock in nfsd_unlink()
Some error paths in nfsd_unlink() allow it to exit without unlocking the
directory. This is not a problem in practice as the directory will be
locked with an fh_put(), but it is untidy and potentially confusing.
This allows us to remove all the fh_unlock() calls that are immediately
after nfsd_unlink() calls.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfs3proc.c')
-rw-r--r-- | fs/nfsd/nfs3proc.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c index 1fb75a68b8e5..3de9b008626c 100644 --- a/fs/nfsd/nfs3proc.c +++ b/fs/nfsd/nfs3proc.c @@ -490,7 +490,6 @@ nfsd3_proc_remove(struct svc_rqst *rqstp) fh_copy(&resp->fh, &argp->fh); resp->status = nfsd_unlink(rqstp, &resp->fh, -S_IFDIR, argp->name, argp->len); - fh_unlock(&resp->fh); return rpc_success; } @@ -511,7 +510,6 @@ nfsd3_proc_rmdir(struct svc_rqst *rqstp) fh_copy(&resp->fh, &argp->fh); resp->status = nfsd_unlink(rqstp, &resp->fh, S_IFDIR, argp->name, argp->len); - fh_unlock(&resp->fh); return rpc_success; } |