ext4: get correct ext4_group_info in ext4_mb_prefetch_fini
We always get ext4_group_desc with group + 1 and ext4_group_info with group to check if we need do initialize ext4_group_info for the group. Just get ext4_group_desc with group for ext4_group_info initialization check. Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Link: https://lore.kernel.org/r/20230303172120.3800725-4-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
01e4ca2945
commit
22fab98402
@ -2569,14 +2569,14 @@ ext4_group_t ext4_mb_prefetch(struct super_block *sb, ext4_group_t group,
|
||||
void ext4_mb_prefetch_fini(struct super_block *sb, ext4_group_t group,
|
||||
unsigned int nr)
|
||||
{
|
||||
while (nr-- > 0) {
|
||||
struct ext4_group_desc *gdp = ext4_get_group_desc(sb, group,
|
||||
NULL);
|
||||
struct ext4_group_info *grp = ext4_get_group_info(sb, group);
|
||||
struct ext4_group_desc *gdp;
|
||||
struct ext4_group_info *grp;
|
||||
|
||||
while (nr-- > 0) {
|
||||
if (!group)
|
||||
group = ext4_get_groups_count(sb);
|
||||
group--;
|
||||
gdp = ext4_get_group_desc(sb, group, NULL);
|
||||
grp = ext4_get_group_info(sb, group);
|
||||
|
||||
if (EXT4_MB_GRP_NEED_INIT(grp) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user