]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - fs/ext4/inode.c
Merge branch 'write_inode2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro...
[linux-2.6.git] / fs / ext4 / inode.c
index f55df7192b9592a936aa23c31fa0e09f61b70b0a..f977aade0d1b551626929e7994377be5553f0d62 100644 (file)
@@ -5348,7 +5348,7 @@ out_brelse:
  * `stuff()' is running, and the new i_size will be lost.  Plus the inode
  * will no longer be on the superblock's dirty inode list.
  */
-int ext4_write_inode(struct inode *inode, int wait)
+int ext4_write_inode(struct inode *inode, struct writeback_control *wbc)
 {
        int err;
 
@@ -5362,7 +5362,7 @@ int ext4_write_inode(struct inode *inode, int wait)
                        return -EIO;
                }
 
-               if (!wait)
+               if (wbc->sync_mode != WB_SYNC_ALL)
                        return 0;
 
                err = ext4_force_commit(inode->i_sb);
@@ -5372,7 +5372,7 @@ int ext4_write_inode(struct inode *inode, int wait)
                err = ext4_get_inode_loc(inode, &iloc);
                if (err)
                        return err;
-               if (wait)
+               if (wbc->sync_mode == WB_SYNC_ALL)
                        sync_dirty_buffer(iloc.bh);
                if (buffer_req(iloc.bh) && !buffer_uptodate(iloc.bh)) {
                        ext4_error(inode->i_sb, "IO error syncing inode, "