We can read fs_info from extent buffer and can drop it from the parameters.
Signed-off-by: David Sterba <[email protected]> --- fs/btrfs/volumes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index eaa9c38e848b..12077c32523f 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6714,10 +6714,10 @@ struct btrfs_device *btrfs_alloc_device(struct btrfs_fs_info *fs_info, } /* Return -EIO if any error, otherwise return 0. */ -static int btrfs_check_chunk_valid(struct btrfs_fs_info *fs_info, - struct extent_buffer *leaf, +static int btrfs_check_chunk_valid(struct extent_buffer *leaf, struct btrfs_chunk *chunk, u64 logical) { + struct btrfs_fs_info *fs_info = leaf->fs_info; u64 length; u64 stripe_len; u16 num_stripes; @@ -6836,7 +6836,7 @@ static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key, length = btrfs_chunk_length(leaf, chunk); num_stripes = btrfs_chunk_num_stripes(leaf, chunk); - ret = btrfs_check_chunk_valid(fs_info, leaf, chunk, logical); + ret = btrfs_check_chunk_valid(leaf, chunk, logical); if (ret) return ret; -- 2.21.0
