summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsproc.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2016-07-19 23:25:42 +0200
committerJ. Bruce Fields <bfields@redhat.com>2016-08-04 23:11:47 +0200
commit12391d07230ec7368269227207b961b2dcb34180 (patch)
tree3ffb23bd0c768d500335d61977e96f30397f4c92 /fs/nfsd/nfsproc.c
parentnfsd: Make creates return EEXIST instead of EACCES (diff)
downloadlinux-12391d07230ec7368269227207b961b2dcb34180.tar.xz
linux-12391d07230ec7368269227207b961b2dcb34180.zip
nfsd: remove redundant zero-length check from create
lookup_one_len already has this check. The only effect of this patch is to return access instead of perm in the 0-length-filename case. I actually prefer nfserr_perm (or _inval?), but I doubt anyone cares. The isdotent check seems redundant too, but I worry that some client might actually care about that strange nfserr_exist error. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfsproc.c')
-rw-r--r--fs/nfsd/nfsproc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
index 4cd78ef4c95c..6722fe52ea15 100644
--- a/fs/nfsd/nfsproc.c
+++ b/fs/nfsd/nfsproc.c
@@ -251,9 +251,6 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
/* Check for NFSD_MAY_WRITE in nfsd_create if necessary */
- nfserr = nfserr_acces;
- if (!argp->len)
- goto done;
nfserr = nfserr_exist;
if (isdotent(argp->name, argp->len))
goto done;