diff options
author | J. Bruce Fields <bfields@redhat.com> | 2016-07-20 16:16:06 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2016-08-04 17:11:49 -0400 |
commit | b44061d0b914c11fb8f8a747c91d111973f56d76 (patch) | |
tree | cc94f0ce9201a9d70c5330ce55d4ec30421dfb67 /fs/nfsd/nfsproc.c | |
parent | e75b23f9e323b1e0759619c39d5a9f7a3a5d9d2c (diff) | |
download | linux-stable-b44061d0b914c11fb8f8a747c91d111973f56d76.tar.gz linux-stable-b44061d0b914c11fb8f8a747c91d111973f56d76.tar.bz2 linux-stable-b44061d0b914c11fb8f8a747c91d111973f56d76.zip |
nfsd: reorganize nfsd_create
There's some odd logic in nfsd_create() that allows it to be called with
the parent directory either locked or unlocked. The only already-locked
caller is NFSv2's nfsd_proc_create(). It's less confusing to split out
the unlocked case into a separate function which the NFSv2 code can call
directly.
Also fix some comments while we're here.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfsproc.c')
-rw-r--r-- | fs/nfsd/nfsproc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index 6722fe52ea15..e9214768cde9 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c @@ -359,8 +359,8 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp, nfserr = 0; if (!inode) { /* File doesn't exist. Create it and set attrs */ - nfserr = nfsd_create(rqstp, dirfhp, argp->name, argp->len, - attr, type, rdev, newfhp); + nfserr = nfsd_create_locked(rqstp, dirfhp, argp->name, + argp->len, attr, type, rdev, newfhp); } else if (type == S_IFREG) { dprintk("nfsd: existing %s, valid=%x, size=%ld\n", argp->name, attr->ia_valid, (long) attr->ia_size); |