]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/nfsproc.c
Merge commit 'v2.6.29-rc1' into core/urgent
[linux-2.6-omap-h63xx.git] / fs / nfsd / nfsproc.c
index 6cfc96a1248314b24a2ec754900e06ceae483116..6f7f26351227f250625430a75268594efc0206ab 100644 (file)
@@ -65,7 +65,8 @@ nfsd_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle  *argp,
        dprintk("nfsd: GETATTR  %s\n", SVCFH_fmt(&argp->fh));
 
        fh_copy(&resp->fh, &argp->fh);
-       nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP);
+       nfserr = fh_verify(rqstp, &resp->fh, 0,
+                       NFSD_MAY_NOP | NFSD_MAY_BYPASS_GSS_ON_ROOT);
        return nfsd_return_attrs(nfserr, resp);
 }
 
@@ -215,11 +216,11 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
                SVCFH_fmt(dirfhp), argp->len, argp->name);
 
        /* First verify the parent file handle */
-       nfserr = fh_verify(rqstp, dirfhp, S_IFDIR, MAY_EXEC);
+       nfserr = fh_verify(rqstp, dirfhp, S_IFDIR, NFSD_MAY_EXEC);
        if (nfserr)
                goto done; /* must fh_put dirfhp even on error */
 
-       /* Check for MAY_WRITE in nfsd_create if necessary */
+       /* Check for NFSD_MAY_WRITE in nfsd_create if necessary */
 
        nfserr = nfserr_acces;
        if (!argp->len)
@@ -281,7 +282,7 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
                                        nfserr = nfsd_permission(rqstp,
                                                                 newfhp->fh_export,
                                                                 newfhp->fh_dentry,
-                                                                MAY_WRITE|MAY_LOCAL_ACCESS);
+                                                                NFSD_MAY_WRITE|NFSD_MAY_LOCAL_ACCESS);
                                        if (nfserr && nfserr != nfserr_rofs)
                                                goto out_unlock;
                                }
@@ -521,7 +522,8 @@ nfsd_proc_statfs(struct svc_rqst * rqstp, struct nfsd_fhandle   *argp,
 
        dprintk("nfsd: STATFS   %s\n", SVCFH_fmt(&argp->fh));
 
-       nfserr = nfsd_statfs(rqstp, &argp->fh, &resp->stats);
+       nfserr = nfsd_statfs(rqstp, &argp->fh, &resp->stats,
+                       NFSD_MAY_BYPASS_GSS_ON_ROOT);
        fh_put(&argp->fh);
        return nfserr;
 }
@@ -614,11 +616,13 @@ nfserrno (int errno)
 #endif
                { nfserr_stale, -ESTALE },
                { nfserr_jukebox, -ETIMEDOUT },
+               { nfserr_jukebox, -ERESTARTSYS },
                { nfserr_dropit, -EAGAIN },
                { nfserr_dropit, -ENOMEM },
                { nfserr_badname, -ESRCH },
                { nfserr_io, -ETXTBSY },
                { nfserr_notsupp, -EOPNOTSUPP },
+               { nfserr_toosmall, -ETOOSMALL },
        };
        int     i;