diff options
author | NeilBrown <neilb@suse.de> | 2022-07-26 16:45:30 +1000 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-08-04 10:28:19 -0400 |
commit | 927bfc5600cd6333c9ef9f090f19e66b7d4c8ee1 (patch) | |
tree | b2d8dc6155bb8050c0ebdca2700ae3fcfb4fe1bf /fs/nfsd/nfs3proc.c | |
parent | c0cbe70742f4a70893cd6e5f6b10b6e89b6db95b (diff) | |
download | linux-927bfc5600cd6333c9ef9f090f19e66b7d4c8ee1.tar.gz linux-927bfc5600cd6333c9ef9f090f19e66b7d4c8ee1.tar.bz2 linux-927bfc5600cd6333c9ef9f090f19e66b7d4c8ee1.zip |
NFSD: change nfsd_create()/nfsd_symlink() to unlock directory before returning.
nfsd_create() usually returns with the directory still locked.
nfsd_symlink() usually returns with it unlocked. This is clumsy.
Until recently nfsd_create() needed to keep the directory locked until
ACLs and security label had been set. These are now set inside
nfsd_create() (in nfsd_setattr()) so this need is gone.
So change nfsd_create() and nfsd_symlink() to always unlock, and remove
any fh_unlock() calls that follow calls to these functions.
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 0078e73009fa..1fb75a68b8e5 100644 --- a/fs/nfsd/nfs3proc.c +++ b/fs/nfsd/nfs3proc.c @@ -388,7 +388,6 @@ nfsd3_proc_mkdir(struct svc_rqst *rqstp) fh_init(&resp->fh, NFS3_FHSIZE); resp->status = nfsd_create(rqstp, &resp->dirfh, argp->name, argp->len, &attrs, S_IFDIR, 0, &resp->fh); - fh_unlock(&resp->dirfh); return rpc_success; } @@ -469,7 +468,6 @@ nfsd3_proc_mknod(struct svc_rqst *rqstp) type = nfs3_ftypes[argp->ftype]; resp->status = nfsd_create(rqstp, &resp->dirfh, argp->name, argp->len, &attrs, type, rdev, &resp->fh); - fh_unlock(&resp->dirfh); out: return rpc_success; } |