Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext4: no need to test for block bitmap bits in ext4_mb_mark_bb()

We don't need the return value of mb_test_and_clear_bits() in ext4_mb_mark_bb()
So simply use mb_clear_bits() instead.

Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/a971935306dafb124da0193c7dad1aa485210b62.1644992610.git.riteshh@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

authored by

Ritesh Harjani and committed by
Theodore Ts'o
bd8247ee 123e3016

+1 -1
+1 -1
fs/ext4/mballoc.c
··· 3941 3941 if (state) 3942 3942 mb_set_bits(bitmap_bh->b_data, blkoff, clen); 3943 3943 else 3944 - mb_test_and_clear_bits(bitmap_bh->b_data, blkoff, clen); 3944 + mb_clear_bits(bitmap_bh->b_data, blkoff, clen); 3945 3945 if (ext4_has_group_desc_csum(sb) && 3946 3946 (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT))) { 3947 3947 gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);