]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/vfs.c
sched: fix CONFIG_SCHED_DEBUG dependency of lockdep sysctls
[linux-2.6-omap-h63xx.git] / fs / nfsd / vfs.c
index f2684e57cf2281e39efa0ec1a687e4888372588d..a0c2b253818b89e8a7f8bb1dbfafd1c5988d436b 100644 (file)
@@ -1309,7 +1309,10 @@ nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp,
 
        if (createmode == NFS3_CREATE_EXCLUSIVE) {
                /* solaris7 gets confused (bugid 4218508) if these have
-                * the high bit set, so just clear the high bits.
+                * the high bit set, so just clear the high bits. If this is
+                * ever changed to use different attrs for storing the
+                * verifier, then do_open_lookup() will also need to be fixed
+                * accordingly.
                 */
                v_mtime = verifier[0]&0x7fffffff;
                v_atime = verifier[1]&0x7fffffff;
@@ -1797,16 +1800,9 @@ nfsd_statfs(struct svc_rqst *rqstp, struct svc_fh *fhp, struct kstatfs *stat)
        return err;
 }
 
-static inline int EX_RDONLY(struct svc_export *exp, struct svc_rqst *rqstp)
+static int exp_rdonly(struct svc_rqst *rqstp, struct svc_export *exp)
 {
-       struct exp_flavor_info *f;
-       struct exp_flavor_info *end = exp->ex_flavors + exp->ex_nflavors;
-
-       for (f = exp->ex_flavors; f < end; f++) {
-               if (f->pseudoflavor == rqstp->rq_flavor)
-                       return f->flags & NFSEXP_READONLY;
-       }
-       return exp->ex_flags & NFSEXP_READONLY;
+       return nfsexp_flags(rqstp, exp) & NFSEXP_READONLY;
 }
 
 /*
@@ -1845,7 +1841,7 @@ nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp,
         */
        if (!(acc & MAY_LOCAL_ACCESS))
                if (acc & (MAY_WRITE | MAY_SATTR | MAY_TRUNC)) {
-                       if (EX_RDONLY(exp, rqstp) || IS_RDONLY(inode))
+                       if (exp_rdonly(rqstp, exp) || IS_RDONLY(inode))
                                return nfserr_rofs;
                        if (/* (acc & MAY_WRITE) && */ IS_IMMUTABLE(inode))
                                return nfserr_perm;