]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/xfs/xfs_iops.c
xfs: remove i_iocount
[mv-sheeva.git] / fs / xfs / xfs_iops.c
index b9c172b3fbbec1c6b8ac2874151f0bb1aa19240d..e041e917c1d9c44beeca1f3572a172c9038bface 100644 (file)
@@ -70,9 +70,8 @@ xfs_synchronize_times(
 }
 
 /*
- * If the linux inode is valid, mark it dirty.
- * Used when committing a dirty inode into a transaction so that
- * the inode will get written back by the linux code
+ * If the linux inode is valid, mark it dirty, else mark the dirty state
+ * in the XFS inode to make sure we pick it up when reclaiming the inode.
  */
 void
 xfs_mark_inode_dirty_sync(
@@ -82,6 +81,10 @@ xfs_mark_inode_dirty_sync(
 
        if (!(inode->i_state & (I_WILL_FREE|I_FREEING)))
                mark_inode_dirty_sync(inode);
+       else {
+               barrier();
+               ip->i_update_core = 1;
+       }
 }
 
 void
@@ -92,6 +95,11 @@ xfs_mark_inode_dirty(
 
        if (!(inode->i_state & (I_WILL_FREE|I_FREEING)))
                mark_inode_dirty(inode);
+       else {
+               barrier();
+               ip->i_update_core = 1;
+       }
+
 }
 
 /*
@@ -825,16 +833,16 @@ xfs_setattr_size(
         * care about here.
         */
        if (ip->i_size != ip->i_d.di_size && iattr->ia_size > ip->i_d.di_size) {
-               error = xfs_flush_pages(ip, ip->i_d.di_size, iattr->ia_size,
-                                       XBF_ASYNC, FI_NONE);
+               error = xfs_flush_pages(ip, ip->i_d.di_size, iattr->ia_size, 0,
+                                       FI_NONE);
                if (error)
                        goto out_unlock;
        }
 
        /*
-        * Wait for all I/O to complete.
+        * Wait for all direct I/O to complete.
         */
-       xfs_ioend_wait(ip);
+       inode_dio_wait(inode);
 
        error = -block_truncate_page(inode->i_mapping, iattr->ia_size,
                                     xfs_get_blocks);