lkml.org 
[lkml]   [2023]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 12/13] ext4: remove unnecessary check for avoiding multiple update_backups in ext4_flex_group_add
Date
Commit 0acdb8876fead ("ext4: don't call update_backups() multiple times
for the same bg") add check in ext4_flex_group_add to avoid call
update_backups multiple times for block group descriptors in the same
group descriptor block. However, we have already call update_backups in
block step, so the added check is unnecessary.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
fs/ext4/resize.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index da832466ce74..d2b3ee50af31 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1589,7 +1589,6 @@ static int ext4_flex_group_add(struct super_block *sb,
int meta_bg = ext4_has_feature_meta_bg(sb);
sector_t padding_blocks = meta_bg ? 0 : sbi->s_sbh->b_blocknr -
ext4_group_first_block_no(sb, 0);
- sector_t old_gdb = 0;

update_backups(sb, ext4_group_first_block_no(sb, 0),
(char *)es, sizeof(struct ext4_super_block), 0);
@@ -1598,11 +1597,8 @@ static int ext4_flex_group_add(struct super_block *sb,

gdb_bh = sbi_array_rcu_deref(sbi, s_group_desc,
gdb_num);
- if (old_gdb == gdb_bh->b_blocknr)
- continue;
update_backups(sb, gdb_bh->b_blocknr - padding_blocks,
gdb_bh->b_data, gdb_bh->b_size, meta_bg);
- old_gdb = gdb_bh->b_blocknr;
}
}
exit:
--
2.30.0
\
 
 \ /
  Last update: 2023-06-29 06:02    [W:0.179 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site