Merge branch 'for-3.4' of git://linux-nfs.org/~bfields/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 19 Apr 2012 21:54:52 +0000 (14:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 19 Apr 2012 21:54:52 +0000 (14:54 -0700)
Pull nfsd bugfixes from J. Bruce Fields:
 "One bugfix, and one minor header fix from Jeff Layton while we're
  here"

* 'for-3.4' of git://linux-nfs.org/~bfields/linux:
  nfsd: include cld.h in the headers_install target
  nfsd: don't fail unchecked creates of non-special files

1  2 
fs/nfsd/nfs4proc.c

diff --combined fs/nfsd/nfs4proc.c
@@@ -235,15 -235,15 +235,15 @@@ do_open_lookup(struct svc_rqst *rqstp, 
                 */
                if (open->op_createmode == NFS4_CREATE_EXCLUSIVE && status == 0)
                        open->op_bmval[1] = (FATTR4_WORD1_TIME_ACCESS |
-                                               FATTR4_WORD1_TIME_MODIFY);
+                                                       FATTR4_WORD1_TIME_MODIFY);
        } else {
                status = nfsd_lookup(rqstp, current_fh,
                                     open->op_fname.data, open->op_fname.len, resfh);
                fh_unlock(current_fh);
-               if (status)
-                       goto out;
-               status = nfsd_check_obj_isreg(resfh);
        }
+       if (status)
+               goto out;
+       status = nfsd_check_obj_isreg(resfh);
        if (status)
                goto out;
  
@@@ -841,7 -841,6 +841,7 @@@ nfsd4_setattr(struct svc_rqst *rqstp, s
              struct nfsd4_setattr *setattr)
  {
        __be32 status = nfs_ok;
 +      int err;
  
        if (setattr->sa_iattr.ia_valid & ATTR_SIZE) {
                nfs4_lock_state();
                        return status;
                }
        }
 -      status = fh_want_write(&cstate->current_fh);
 -      if (status)
 -              return status;
 +      err = fh_want_write(&cstate->current_fh);
 +      if (err)
 +              return nfserrno(err);
        status = nfs_ok;
  
        status = check_attr_support(rqstp, cstate, setattr->sa_bmval,