Merge branch 'write_inode2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Mar 2010 19:53:53 +0000 (11:53 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Mar 2010 19:53:53 +0000 (11:53 -0800)
* 'write_inode2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  pass writeback_control to ->write_inode
  make sure data is on disk before calling ->write_inode

1  2 
fs/ext4/ext4.h
fs/ext4/inode.c

diff --cc fs/ext4/ext4.h
Simple merge
diff --cc fs/ext4/inode.c
@@@ -5372,11 -5201,13 +5372,11 @@@ int ext4_write_inode(struct inode *inod
                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, __func__,
 -                                 "IO error syncing inode, "
 -                                 "inode=%lu, block=%llu",
 -                                 inode->i_ino,
 +                      ext4_error(inode->i_sb, "IO error syncing inode, "
 +                                 "inode=%lu, block=%llu", inode->i_ino,
                                   (unsigned long long)iloc.bh->b_blocknr);
                        err = -EIO;
                }