diff options
-rw-r--r-- | fs/ext3/inode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 4ecf88fb69a8..ddf5c21cffbc 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -3210,7 +3210,12 @@ int ext3_write_inode(struct inode *inode, struct writeback_control *wbc) return -EIO; } - if (wbc->sync_mode != WB_SYNC_ALL) + /* + * No need to force transaction in WB_SYNC_NONE mode. Also + * ext3_sync_fs() will force the commit after everything is + * written. + */ + if (wbc->sync_mode != WB_SYNC_ALL || wbc->for_sync) return 0; return ext3_force_commit(inode->i_sb); |