diff options
Diffstat (limited to 'fs/ext4/ext4_jbd2.c')
-rw-r--r-- | fs/ext4/ext4_jbd2.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index bfa65b49d424..b4323ba846b5 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c | |||
@@ -143,17 +143,13 @@ int __ext4_handle_dirty_super(const char *where, unsigned int line, | |||
143 | struct buffer_head *bh = EXT4_SB(sb)->s_sbh; | 143 | struct buffer_head *bh = EXT4_SB(sb)->s_sbh; |
144 | int err = 0; | 144 | int err = 0; |
145 | 145 | ||
146 | ext4_superblock_csum_set(sb); | ||
146 | if (ext4_handle_valid(handle)) { | 147 | if (ext4_handle_valid(handle)) { |
147 | ext4_superblock_csum_set(sb, | ||
148 | (struct ext4_super_block *)bh->b_data); | ||
149 | err = jbd2_journal_dirty_metadata(handle, bh); | 148 | err = jbd2_journal_dirty_metadata(handle, bh); |
150 | if (err) | 149 | if (err) |
151 | ext4_journal_abort_handle(where, line, __func__, | 150 | ext4_journal_abort_handle(where, line, __func__, |
152 | bh, handle, err); | 151 | bh, handle, err); |
153 | } else { | 152 | } else |
154 | ext4_superblock_csum_set(sb, | ||
155 | (struct ext4_super_block *)bh->b_data); | ||
156 | mark_buffer_dirty(bh); | 153 | mark_buffer_dirty(bh); |
157 | } | ||
158 | return err; | 154 | return err; |
159 | } | 155 | } |