ext4: remove unused group parameter in ext4_block_bitmap_csum_set
Remove unused group parameter in ext4_block_bitmap_csum_set. After this, group parameter in ext4_set_bitmap_checksums is also not used, just remove it too. Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20230221203027.2359920-5-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
Родитель
82483dfe17
Коммит
1df9bde48f
|
@ -80,7 +80,7 @@ int ext4_block_bitmap_csum_verify(struct super_block *sb,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ext4_block_bitmap_csum_set(struct super_block *sb, ext4_group_t group,
|
||||
void ext4_block_bitmap_csum_set(struct super_block *sb,
|
||||
struct ext4_group_desc *gdp,
|
||||
struct buffer_head *bh)
|
||||
{
|
||||
|
|
|
@ -2682,7 +2682,7 @@ void ext4_inode_bitmap_csum_set(struct super_block *sb,
|
|||
int ext4_inode_bitmap_csum_verify(struct super_block *sb,
|
||||
struct ext4_group_desc *gdp,
|
||||
struct buffer_head *bh, int sz);
|
||||
void ext4_block_bitmap_csum_set(struct super_block *sb, ext4_group_t group,
|
||||
void ext4_block_bitmap_csum_set(struct super_block *sb,
|
||||
struct ext4_group_desc *gdp,
|
||||
struct buffer_head *bh);
|
||||
int ext4_block_bitmap_csum_verify(struct super_block *sb,
|
||||
|
|
|
@ -813,8 +813,7 @@ int ext4_mark_inode_used(struct super_block *sb, int ino)
|
|||
gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
|
||||
ext4_free_group_clusters_set(sb, gdp,
|
||||
ext4_free_clusters_after_init(sb, group, gdp));
|
||||
ext4_block_bitmap_csum_set(sb, group, gdp,
|
||||
block_bitmap_bh);
|
||||
ext4_block_bitmap_csum_set(sb, gdp, block_bitmap_bh);
|
||||
ext4_group_desc_csum_set(sb, group, gdp);
|
||||
}
|
||||
ext4_unlock_group(sb, group);
|
||||
|
@ -1165,8 +1164,7 @@ got:
|
|||
gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
|
||||
ext4_free_group_clusters_set(sb, gdp,
|
||||
ext4_free_clusters_after_init(sb, group, gdp));
|
||||
ext4_block_bitmap_csum_set(sb, group, gdp,
|
||||
block_bitmap_bh);
|
||||
ext4_block_bitmap_csum_set(sb, gdp, block_bitmap_bh);
|
||||
ext4_group_desc_csum_set(sb, group, gdp);
|
||||
}
|
||||
ext4_unlock_group(sb, group);
|
||||
|
|
|
@ -3822,7 +3822,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
|
|||
}
|
||||
len = ext4_free_group_clusters(sb, gdp) - ac->ac_b_ex.fe_len;
|
||||
ext4_free_group_clusters_set(sb, gdp, len);
|
||||
ext4_block_bitmap_csum_set(sb, ac->ac_b_ex.fe_group, gdp, bitmap_bh);
|
||||
ext4_block_bitmap_csum_set(sb, gdp, bitmap_bh);
|
||||
ext4_group_desc_csum_set(sb, ac->ac_b_ex.fe_group, gdp);
|
||||
|
||||
ext4_unlock_group(sb, ac->ac_b_ex.fe_group);
|
||||
|
@ -3929,7 +3929,7 @@ void ext4_mb_mark_bb(struct super_block *sb, ext4_fsblk_t block,
|
|||
clen = ext4_free_group_clusters(sb, gdp) + clen_changed;
|
||||
|
||||
ext4_free_group_clusters_set(sb, gdp, clen);
|
||||
ext4_block_bitmap_csum_set(sb, group, gdp, bitmap_bh);
|
||||
ext4_block_bitmap_csum_set(sb, gdp, bitmap_bh);
|
||||
ext4_group_desc_csum_set(sb, group, gdp);
|
||||
|
||||
ext4_unlock_group(sb, group);
|
||||
|
@ -5861,7 +5861,7 @@ static void ext4_free_blocks_simple(struct inode *inode, ext4_fsblk_t block,
|
|||
ext4_free_group_clusters_set(
|
||||
sb, gdp, ext4_free_group_clusters(sb, gdp) +
|
||||
count - already_freed);
|
||||
ext4_block_bitmap_csum_set(sb, group, gdp, bitmap_bh);
|
||||
ext4_block_bitmap_csum_set(sb, gdp, bitmap_bh);
|
||||
ext4_group_desc_csum_set(sb, group, gdp);
|
||||
ext4_handle_dirty_metadata(NULL, NULL, gdp_bh);
|
||||
sync_dirty_buffer(bitmap_bh);
|
||||
|
@ -6023,7 +6023,7 @@ do_more:
|
|||
|
||||
ret = ext4_free_group_clusters(sb, gdp) + count_clusters;
|
||||
ext4_free_group_clusters_set(sb, gdp, ret);
|
||||
ext4_block_bitmap_csum_set(sb, block_group, gdp, bitmap_bh);
|
||||
ext4_block_bitmap_csum_set(sb, gdp, bitmap_bh);
|
||||
ext4_group_desc_csum_set(sb, block_group, gdp);
|
||||
ext4_unlock_group(sb, block_group);
|
||||
|
||||
|
@ -6280,7 +6280,7 @@ int ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
|
|||
free_clusters_count = clusters_freed +
|
||||
ext4_free_group_clusters(sb, desc);
|
||||
ext4_free_group_clusters_set(sb, desc, free_clusters_count);
|
||||
ext4_block_bitmap_csum_set(sb, block_group, desc, bitmap_bh);
|
||||
ext4_block_bitmap_csum_set(sb, desc, bitmap_bh);
|
||||
ext4_group_desc_csum_set(sb, block_group, desc);
|
||||
ext4_unlock_group(sb, block_group);
|
||||
percpu_counter_add(&sbi->s_freeclusters_counter,
|
||||
|
|
|
@ -1306,7 +1306,6 @@ static struct buffer_head *ext4_get_bitmap(struct super_block *sb, __u64 block)
|
|||
}
|
||||
|
||||
static int ext4_set_bitmap_checksums(struct super_block *sb,
|
||||
ext4_group_t group,
|
||||
struct ext4_group_desc *gdp,
|
||||
struct ext4_new_group_data *group_data)
|
||||
{
|
||||
|
@ -1325,7 +1324,7 @@ static int ext4_set_bitmap_checksums(struct super_block *sb,
|
|||
bh = ext4_get_bitmap(sb, group_data->block_bitmap);
|
||||
if (!bh)
|
||||
return -EIO;
|
||||
ext4_block_bitmap_csum_set(sb, group, gdp, bh);
|
||||
ext4_block_bitmap_csum_set(sb, gdp, bh);
|
||||
brelse(bh);
|
||||
|
||||
return 0;
|
||||
|
@ -1363,7 +1362,7 @@ static int ext4_setup_new_descs(handle_t *handle, struct super_block *sb,
|
|||
memset(gdp, 0, EXT4_DESC_SIZE(sb));
|
||||
ext4_block_bitmap_set(sb, gdp, group_data->block_bitmap);
|
||||
ext4_inode_bitmap_set(sb, gdp, group_data->inode_bitmap);
|
||||
err = ext4_set_bitmap_checksums(sb, group, gdp, group_data);
|
||||
err = ext4_set_bitmap_checksums(sb, gdp, group_data);
|
||||
if (err) {
|
||||
ext4_std_error(sb, err);
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче