aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/jbd2/journal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 915dd575cd46..02c7ad9d7a41 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1335,6 +1335,7 @@ static int journal_reset(journal_t *journal)
1335static void jbd2_write_superblock(journal_t *journal, int write_op) 1335static void jbd2_write_superblock(journal_t *journal, int write_op)
1336{ 1336{
1337 struct buffer_head *bh = journal->j_sb_buffer; 1337 struct buffer_head *bh = journal->j_sb_buffer;
1338 journal_superblock_t *sb = journal->j_superblock;
1338 int ret; 1339 int ret;
1339 1340
1340 trace_jbd2_write_superblock(journal, write_op); 1341 trace_jbd2_write_superblock(journal, write_op);
@@ -1356,6 +1357,7 @@ static void jbd2_write_superblock(journal_t *journal, int write_op)
1356 clear_buffer_write_io_error(bh); 1357 clear_buffer_write_io_error(bh);
1357 set_buffer_uptodate(bh); 1358 set_buffer_uptodate(bh);
1358 } 1359 }
1360 jbd2_superblock_csum_set(journal, sb);
1359 get_bh(bh); 1361 get_bh(bh);
1360 bh->b_end_io = end_buffer_write_sync; 1362 bh->b_end_io = end_buffer_write_sync;
1361 ret = submit_bh(write_op, bh); 1363 ret = submit_bh(write_op, bh);
@@ -1452,7 +1454,6 @@ void jbd2_journal_update_sb_errno(journal_t *journal)
1452 jbd_debug(1, "JBD2: updating superblock error (errno %d)\n", 1454 jbd_debug(1, "JBD2: updating superblock error (errno %d)\n",
1453 journal->j_errno); 1455 journal->j_errno);
1454 sb->s_errno = cpu_to_be32(journal->j_errno); 1456 sb->s_errno = cpu_to_be32(journal->j_errno);
1455 jbd2_superblock_csum_set(journal, sb);
1456 read_unlock(&journal->j_state_lock); 1457 read_unlock(&journal->j_state_lock);
1457 1458
1458 jbd2_write_superblock(journal, WRITE_SYNC); 1459 jbd2_write_superblock(journal, WRITE_SYNC);