ext4: correct cluster len and clusters changed accounting in ext4_mb_mark_bb
authorRitesh Harjani <riteshh@linux.ibm.com>
Wed, 16 Feb 2022 07:02:43 +0000 (12:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:40:32 +0000 (14:40 +0200)
commit69d2421b5527609387998d76cabd8d700c2f23c1
tree978f3255a78ed1dfbbde4361d923430ea0fccaf9
parentecd384c436fd57195a2d178d5b85ab7060e35866
ext4: correct cluster len and clusters changed accounting in ext4_mb_mark_bb

[ Upstream commit a5c0e2fdf7cea535ba03259894dc184e5a4c2800 ]

ext4_mb_mark_bb() currently wrongly calculates cluster len (clen) and
flex_group->free_clusters. This patch fixes that.

Identified based on code review of ext4_mb_mark_bb() function.

Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/a0b035d536bafa88110b74456853774b64c8ac40.1644992609.git.riteshh@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/mballoc.c