summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-checker.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-03-20 16:02:56 +0100
committerDavid Sterba <dsterba@suse.com>2019-04-29 19:02:33 +0200
commit68128ce756204bfd9f10223cb7ecc986eb335c86 (patch)
treeb5141853e8a81d3cf7277d5c01b2d3f4348ab406 /fs/btrfs/tree-checker.c
parent1fd715ffdd14870307c8cd6965c454d928b66d40 (diff)
downloadlinux-68128ce756204bfd9f10223cb7ecc986eb335c86.tar.bz2
btrfs: tree-checker: get fs_info from eb in check_csum_item
We can read fs_info from extent buffer and can drop it from the parameters. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-checker.c')
-rw-r--r--fs/btrfs/tree-checker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 363462d30681..ba50ce494cbd 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -188,10 +188,10 @@ static int check_extent_data_item(struct btrfs_fs_info *fs_info,
return 0;
}
-static int check_csum_item(struct btrfs_fs_info *fs_info,
- struct extent_buffer *leaf, struct btrfs_key *key,
+static int check_csum_item(struct extent_buffer *leaf, struct btrfs_key *key,
int slot)
{
+ struct btrfs_fs_info *fs_info = leaf->fs_info;
u32 sectorsize = fs_info->sectorsize;
u32 csumsize = btrfs_super_csum_size(fs_info->super_copy);
@@ -784,7 +784,7 @@ static int check_leaf_item(struct btrfs_fs_info *fs_info,
ret = check_extent_data_item(fs_info, leaf, key, slot);
break;
case BTRFS_EXTENT_CSUM_KEY:
- ret = check_csum_item(fs_info, leaf, key, slot);
+ ret = check_csum_item(leaf, key, slot);
break;
case BTRFS_DIR_ITEM_KEY:
case BTRFS_DIR_INDEX_KEY: