]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
NFS: Clean up the callers of nfs_wb_all()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 31 Jul 2010 18:29:06 +0000 (14:29 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 4 Aug 2010 02:06:40 +0000 (22:06 -0400)
There is no need to flush out writes before calling nfs_wb_all().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/delegation.c
fs/nfs/inode.c

index f34f4ac52b818e162ee76292af9d99679908679e..b9c3c43cea1def16da3d9df934fd846dd478488f 100644 (file)
@@ -268,14 +268,6 @@ out:
        return status;
 }
 
-/* Sync all data to disk upon delegation return */
-static void nfs_msync_inode(struct inode *inode)
-{
-       filemap_fdatawrite(inode->i_mapping);
-       nfs_wb_all(inode);
-       filemap_fdatawait(inode->i_mapping);
-}
-
 /*
  * Basic procedure for returning a delegation to the server
  */
@@ -367,7 +359,7 @@ int nfs_inode_return_delegation(struct inode *inode)
                delegation = nfs_detach_delegation_locked(nfsi, NULL, clp);
                spin_unlock(&clp->cl_lock);
                if (delegation != NULL) {
-                       nfs_msync_inode(inode);
+                       nfs_wb_all(inode);
                        err = __nfs_inode_return_delegation(inode, delegation, 1);
                }
        }
index ec7a8f96a2c2fbc4ab995222502fa6f08b21ed28..581d8f081e682da19c4cd622bf47227ddb68aceb 100644 (file)
@@ -413,10 +413,8 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
                return 0;
 
        /* Write all dirty data */
-       if (S_ISREG(inode->i_mode)) {
-               filemap_write_and_wait(inode->i_mapping);
+       if (S_ISREG(inode->i_mode))
                nfs_wb_all(inode);
-       }
 
        fattr = nfs_alloc_fattr();
        if (fattr == NULL)