mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
ext4: remove sbi argument from ext4_chksum()
Since ext4_chksum() no longer uses its sbi 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-2-ebiggers@kernel.org Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
7ac67301e8
commit
6cbab5f95e
@@ -346,11 +346,10 @@ static struct ext4_dir_entry_tail *get_dirent_tail(struct inode *inode,
|
||||
|
||||
static __le32 ext4_dirblock_csum(struct inode *inode, void *dirent, int size)
|
||||
{
|
||||
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
|
||||
struct ext4_inode_info *ei = EXT4_I(inode);
|
||||
__u32 csum;
|
||||
|
||||
csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)dirent, size);
|
||||
csum = ext4_chksum(ei->i_csum_seed, (__u8 *)dirent, size);
|
||||
return cpu_to_le32(csum);
|
||||
}
|
||||
|
||||
@@ -442,7 +441,6 @@ static struct dx_countlimit *get_dx_countlimit(struct inode *inode,
|
||||
static __le32 ext4_dx_csum(struct inode *inode, struct ext4_dir_entry *dirent,
|
||||
int count_offset, int count, struct dx_tail *t)
|
||||
{
|
||||
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
|
||||
struct ext4_inode_info *ei = EXT4_I(inode);
|
||||
__u32 csum;
|
||||
int size;
|
||||
@@ -450,9 +448,9 @@ static __le32 ext4_dx_csum(struct inode *inode, struct ext4_dir_entry *dirent,
|
||||
int offset = offsetof(struct dx_tail, dt_checksum);
|
||||
|
||||
size = count_offset + (count * sizeof(struct dx_entry));
|
||||
csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)dirent, size);
|
||||
csum = ext4_chksum(sbi, csum, (__u8 *)t, offset);
|
||||
csum = ext4_chksum(sbi, csum, (__u8 *)&dummy_csum, sizeof(dummy_csum));
|
||||
csum = ext4_chksum(ei->i_csum_seed, (__u8 *)dirent, size);
|
||||
csum = ext4_chksum(csum, (__u8 *)t, offset);
|
||||
csum = ext4_chksum(csum, (__u8 *)&dummy_csum, sizeof(dummy_csum));
|
||||
|
||||
return cpu_to_le32(csum);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user