|
@@ -143,9 +143,10 @@ int ext4_superblock_csum_verify(struct super_block *sb,
|
|
|
return es->s_checksum == ext4_superblock_csum(sb, es);
|
|
|
}
|
|
|
|
|
|
-void ext4_superblock_csum_set(struct super_block *sb,
|
|
|
- struct ext4_super_block *es)
|
|
|
+void ext4_superblock_csum_set(struct super_block *sb)
|
|
|
{
|
|
|
+ struct ext4_super_block *es = EXT4_SB(sb)->s_es;
|
|
|
+
|
|
|
if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
|
|
|
EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
|
|
|
return;
|
|
@@ -4387,7 +4388,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
|
|
|
cpu_to_le32(percpu_counter_sum_positive(
|
|
|
&EXT4_SB(sb)->s_freeinodes_counter));
|
|
|
BUFFER_TRACE(sbh, "marking dirty");
|
|
|
- ext4_superblock_csum_set(sb, es);
|
|
|
+ ext4_superblock_csum_set(sb);
|
|
|
mark_buffer_dirty(sbh);
|
|
|
if (sync) {
|
|
|
error = sync_dirty_buffer(sbh);
|