Replace ext4_inode_bitmap_csum_set() with the newly added ext4_inode_bitmap_csum_set_fast() in ext4_free_inode() for incremental inode bitmap checksum update. This is safe because: - At inode free time, the inode bitmap checksum has already been initialized, so the old checksum is always valid. - The bitmap buffer modification and checksum update are protected by the same group lock, ensuring the old checksum is consistent with the bitmap content before the bit flip. Signed-off-by: Baokun Li --- fs/ext4/ialloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 3fd8f0099852..55eb69fbb4c9 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -327,7 +327,7 @@ void ext4_free_inode(handle_t *handle, struct inode *inode) if (percpu_counter_initialized(&sbi->s_dirs_counter)) percpu_counter_dec(&sbi->s_dirs_counter); } - ext4_inode_bitmap_csum_set(sb, gdp, bitmap_bh); + ext4_inode_bitmap_csum_set_fast(sb, gdp, bit); ext4_group_desc_csum_set(sb, block_group, gdp); ext4_unlock_group(sb, block_group); -- 2.43.7