Merge branch 'write_inode2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* '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
This commit is contained in:
@@ -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, "
|
||||
|
Reference in New Issue
Block a user