nfsd: reorganize nfsd_create
[cascardo/linux.git] / fs / nfsd / nfsproc.c
index 4cd78ef..e921476 100644 (file)
@@ -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;
@@ -362,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);