summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2020-11-27 12:33:55 +0100
committerTheodore Ts'o <tytso@mit.edu>2020-12-17 13:30:55 -0500
commit81414b4dd48f596bf33e1b32c2e43e2047150ca6 (patch)
treec5a2dd62696f951be1a1afe7c5160bdce4356fb4 /fs/ext4
parentb08070eca9e247f60ab39d79b2c25d274750441f (diff)
downloadlinux-81414b4dd48f596bf33e1b32c2e43e2047150ca6.tar.bz2
ext4: remove redundant sb checksum recomputation
Superblock is written out either through ext4_commit_super() or through ext4_handle_dirty_super(). In both cases we recompute the checksum so it is not necessary to recompute it after updating superblock free inodes & blocks counters. Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Andreas Dilger <adilger@dilger.ca> Link: https://lore.kernel.org/r/20201127113405.26867-3-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3ef84e8ab1ae..7bb516c9b2de 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5010,13 +5010,11 @@ no_journal:
block = ext4_count_free_clusters(sb);
ext4_free_blocks_count_set(sbi->s_es,
EXT4_C2B(sbi, block));
- ext4_superblock_csum_set(sb);
err = percpu_counter_init(&sbi->s_freeclusters_counter, block,
GFP_KERNEL);
if (!err) {
unsigned long freei = ext4_count_free_inodes(sb);
sbi->s_es->s_free_inodes_count = cpu_to_le32(freei);
- ext4_superblock_csum_set(sb);
err = percpu_counter_init(&sbi->s_freeinodes_counter, freei,
GFP_KERNEL);
}