btrfs: get fs_info from eb in read_one_dev

We can read fs_info from extent buffer and can drop it from the
parameters.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2019-03-20 16:45:15 +01:00
parent 9690ac0987
commit 178507595c
1 changed files with 3 additions and 3 deletions

View File

@ -6877,10 +6877,10 @@ static struct btrfs_fs_devices *open_seed_devices(struct btrfs_fs_info *fs_info,
return fs_devices; return fs_devices;
} }
static int read_one_dev(struct btrfs_fs_info *fs_info, static int read_one_dev(struct extent_buffer *leaf,
struct extent_buffer *leaf,
struct btrfs_dev_item *dev_item) struct btrfs_dev_item *dev_item)
{ {
struct btrfs_fs_info *fs_info = leaf->fs_info;
struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
struct btrfs_device *device; struct btrfs_device *device;
u64 devid; u64 devid;
@ -7210,7 +7210,7 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)
struct btrfs_dev_item *dev_item; struct btrfs_dev_item *dev_item;
dev_item = btrfs_item_ptr(leaf, slot, dev_item = btrfs_item_ptr(leaf, slot,
struct btrfs_dev_item); struct btrfs_dev_item);
ret = read_one_dev(fs_info, leaf, dev_item); ret = read_one_dev(leaf, dev_item);
if (ret) if (ret)
goto error; goto error;
total_dev++; total_dev++;