Merge branch 'for-2.6.34-incoming' into for-2.6.35-incoming
authorJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 9 Jun 2010 00:05:18 +0000 (20:05 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 9 Jun 2010 00:05:18 +0000 (20:05 -0400)
1  2 
fs/nfsd/vfs.c

diff --combined fs/nfsd/vfs.c
@@@ -443,8 -443,7 +443,7 @@@ nfsd_setattr(struct svc_rqst *rqstp, st
        if (size_change)
                put_write_access(inode);
        if (!err)
-               if (EX_ISSYNC(fhp->fh_export))
-                       write_inode_now(inode, 1);
+               commit_metadata(fhp);
  out:
        return err;
  
@@@ -724,7 -723,7 +723,7 @@@ nfsd_open(struct svc_rqst *rqstp, struc
        struct inode    *inode;
        int             flags = O_RDONLY|O_LARGEFILE;
        __be32          err;
 -      int             host_err;
 +      int             host_err = 0;
  
        validate_process_creds();
  
         * Check to see if there are any leases on this file.
         * This may block while leases are broken.
         */
 -      host_err = break_lease(inode, O_NONBLOCK | ((access & NFSD_MAY_WRITE) ? O_WRONLY : 0));
 +      if (!(access & NFSD_MAY_NOT_BREAK_LEASE))
 +              host_err = break_lease(inode, O_NONBLOCK | ((access & NFSD_MAY_WRITE) ? O_WRONLY : 0));
        if (host_err == -EWOULDBLOCK)
                host_err = -ETIMEDOUT;
        if (host_err) /* NOMEM or WOULDBLOCK */
@@@ -1170,8 -1168,7 +1169,8 @@@ nfsd_commit(struct svc_rqst *rqstp, str
                        goto out;
        }
  
 -      err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_WRITE, &file);
 +      err = nfsd_open(rqstp, fhp, S_IFREG,
 +                      NFSD_MAY_WRITE|NFSD_MAY_NOT_BREAK_LEASE, &file);
        if (err)
                goto out;
        if (EX_ISSYNC(fhp->fh_export)) {