mirror of https://github.com/torvalds/linux.git
ext4: remove sb argument from ext4_superblock_csum()
Since ext4_superblock_csum() no longer uses its sb argument, remove it. Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Baokun Li <libaokun1@huawei.com> Link: https://patch.msgid.link/20250513053809.699974-3-ebiggers@kernel.org Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
6cbab5f95e
commit
6017dbb7b6
|
|
@ -3136,8 +3136,7 @@ extern int ext4_read_bh_lock(struct buffer_head *bh, blk_opf_t op_flags, bool wa
|
|||
extern void ext4_sb_breadahead_unmovable(struct super_block *sb, sector_t block);
|
||||
extern int ext4_seq_options_show(struct seq_file *seq, void *offset);
|
||||
extern int ext4_calculate_overhead(struct super_block *sb);
|
||||
extern __le32 ext4_superblock_csum(struct super_block *sb,
|
||||
struct ext4_super_block *es);
|
||||
extern __le32 ext4_superblock_csum(struct ext4_super_block *es);
|
||||
extern void ext4_superblock_csum_set(struct super_block *sb);
|
||||
extern int ext4_alloc_flex_bg_array(struct super_block *sb,
|
||||
ext4_group_t ngroup);
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ static int ext4_update_backup_sb(struct super_block *sb,
|
|||
es = (struct ext4_super_block *) (bh->b_data + offset);
|
||||
lock_buffer(bh);
|
||||
if (ext4_has_feature_metadata_csum(sb) &&
|
||||
es->s_checksum != ext4_superblock_csum(sb, es)) {
|
||||
es->s_checksum != ext4_superblock_csum(es)) {
|
||||
ext4_msg(sb, KERN_ERR, "Invalid checksum for backup "
|
||||
"superblock %llu", sb_block);
|
||||
unlock_buffer(bh);
|
||||
|
|
@ -151,7 +151,7 @@ static int ext4_update_backup_sb(struct super_block *sb,
|
|||
}
|
||||
func(es, arg);
|
||||
if (ext4_has_feature_metadata_csum(sb))
|
||||
es->s_checksum = ext4_superblock_csum(sb, es);
|
||||
es->s_checksum = ext4_superblock_csum(es);
|
||||
set_buffer_uptodate(bh);
|
||||
unlock_buffer(bh);
|
||||
|
||||
|
|
|
|||
|
|
@ -1119,7 +1119,7 @@ static inline void ext4_set_block_group_nr(struct super_block *sb, char *data,
|
|||
|
||||
es->s_block_group_nr = cpu_to_le16(group);
|
||||
if (ext4_has_feature_metadata_csum(sb))
|
||||
es->s_checksum = ext4_superblock_csum(sb, es);
|
||||
es->s_checksum = ext4_superblock_csum(es);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -286,8 +286,7 @@ static int ext4_verify_csum_type(struct super_block *sb,
|
|||
return es->s_checksum_type == EXT4_CRC32C_CHKSUM;
|
||||
}
|
||||
|
||||
__le32 ext4_superblock_csum(struct super_block *sb,
|
||||
struct ext4_super_block *es)
|
||||
__le32 ext4_superblock_csum(struct ext4_super_block *es)
|
||||
{
|
||||
int offset = offsetof(struct ext4_super_block, s_checksum);
|
||||
__u32 csum;
|
||||
|
|
@ -303,7 +302,7 @@ static int ext4_superblock_csum_verify(struct super_block *sb,
|
|||
if (!ext4_has_feature_metadata_csum(sb))
|
||||
return 1;
|
||||
|
||||
return es->s_checksum == ext4_superblock_csum(sb, es);
|
||||
return es->s_checksum == ext4_superblock_csum(es);
|
||||
}
|
||||
|
||||
void ext4_superblock_csum_set(struct super_block *sb)
|
||||
|
|
@ -313,7 +312,7 @@ void ext4_superblock_csum_set(struct super_block *sb)
|
|||
if (!ext4_has_feature_metadata_csum(sb))
|
||||
return;
|
||||
|
||||
es->s_checksum = ext4_superblock_csum(sb, es);
|
||||
es->s_checksum = ext4_superblock_csum(es);
|
||||
}
|
||||
|
||||
ext4_fsblk_t ext4_block_bitmap(struct super_block *sb,
|
||||
|
|
@ -5912,7 +5911,7 @@ static struct file *ext4_get_journal_blkdev(struct super_block *sb,
|
|||
|
||||
if ((le32_to_cpu(es->s_feature_ro_compat) &
|
||||
EXT4_FEATURE_RO_COMPAT_METADATA_CSUM) &&
|
||||
es->s_checksum != ext4_superblock_csum(sb, es)) {
|
||||
es->s_checksum != ext4_superblock_csum(es)) {
|
||||
ext4_msg(sb, KERN_ERR, "external journal has corrupt superblock");
|
||||
errno = -EFSCORRUPTED;
|
||||
goto out_bh;
|
||||
|
|
|
|||
Loading…
Reference in New Issue