From 12391d07230ec7368269227207b961b2dcb34180 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Tue, 19 Jul 2016 17:25:42 -0400 Subject: 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 --- fs/nfsd/vfs.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'fs/nfsd/vfs.c') diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index fda4f86..fba8e7e 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -1154,9 +1154,6 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, __be32 err2; int host_err; - err = nfserr_perm; - if (!flen) - goto out; err = nfserr_exist; if (isdotent(fname, flen)) goto out; -- cgit v1.1