aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/super.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e27acd18b4b0..e4a241c65dbe 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2884,12 +2884,9 @@ int ext4_force_commit(struct super_block *sb)
2884/* 2884/*
2885 * Ext4 always journals updates to the superblock itself, so we don't 2885 * Ext4 always journals updates to the superblock itself, so we don't
2886 * have to propagate any other updates to the superblock on disk at this 2886 * have to propagate any other updates to the superblock on disk at this
2887 * point. Just start an async writeback to get the buffers on their way 2887 * point. (We can probably nuke this function altogether, and remove
2888 * to the disk. 2888 * any mention to sb->s_dirt in all of fs/ext4; eventual cleanup...)
2889 *
2890 * This implicitly triggers the writebehind on sync().
2891 */ 2889 */
2892
2893static void ext4_write_super(struct super_block *sb) 2890static void ext4_write_super(struct super_block *sb)
2894{ 2891{
2895 if (mutex_trylock(&sb->s_lock) != 0) 2892 if (mutex_trylock(&sb->s_lock) != 0)
@@ -2899,15 +2896,15 @@ static void ext4_write_super(struct super_block *sb)
2899 2896
2900static int ext4_sync_fs(struct super_block *sb, int wait) 2897static int ext4_sync_fs(struct super_block *sb, int wait)
2901{ 2898{
2902 tid_t target; 2899 int ret = 0;
2903 2900
2904 trace_mark(ext4_sync_fs, "dev %s wait %d", sb->s_id, wait); 2901 trace_mark(ext4_sync_fs, "dev %s wait %d", sb->s_id, wait);
2905 sb->s_dirt = 0; 2902 sb->s_dirt = 0;
2906 if (jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, &target)) { 2903 if (wait)
2907 if (wait) 2904 ret = ext4_force_commit(sb);
2908 jbd2_log_wait_commit(EXT4_SB(sb)->s_journal, target); 2905 else
2909 } 2906 jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, NULL);
2910 return 0; 2907 return ret;
2911} 2908}
2912 2909
2913/* 2910/*