aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/super.c3
-rw-r--r--fs/jbd2/journal.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 14909cd91515..a51db9ca90fd 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4667,7 +4667,8 @@ static int ext4_commit_super(struct super_block *sb, int sync)
4667 ext4_superblock_csum_set(sb); 4667 ext4_superblock_csum_set(sb);
4668 mark_buffer_dirty(sbh); 4668 mark_buffer_dirty(sbh);
4669 if (sync) { 4669 if (sync) {
4670 error = sync_dirty_buffer(sbh); 4670 error = __sync_dirty_buffer(sbh,
4671 test_opt(sb, BARRIER) ? WRITE_FUA : WRITE_SYNC);
4671 if (error) 4672 if (error)
4672 return error; 4673 return error;
4673 4674
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 4ff3fad4e9e3..fe1b4bdecdfa 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1456,7 +1456,7 @@ void jbd2_journal_update_sb_errno(journal_t *journal)
1456 sb->s_errno = cpu_to_be32(journal->j_errno); 1456 sb->s_errno = cpu_to_be32(journal->j_errno);
1457 read_unlock(&journal->j_state_lock); 1457 read_unlock(&journal->j_state_lock);
1458 1458
1459 jbd2_write_superblock(journal, WRITE_SYNC); 1459 jbd2_write_superblock(journal, WRITE_FUA);
1460} 1460}
1461EXPORT_SYMBOL(jbd2_journal_update_sb_errno); 1461EXPORT_SYMBOL(jbd2_journal_update_sb_errno);
1462 1462