diff options
author | David Sterba <dsterba@suse.com> | 2019-03-20 16:38:52 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:39 +0200 |
commit | 6ec0896c4c810da6abf2130f13cbbe38a8955697 (patch) | |
tree | 21148480fd12fdb55e0b6d8d04819acd770464e2 | |
parent | 813fd1dcab2d030ce4445f3ecc143a492a62e8b8 (diff) | |
download | linux-6ec0896c4c810da6abf2130f13cbbe38a8955697.tar.bz2 |
btrfs: get fs_info from eb in should_balance_chunk
We can read fs_info from extent buffer and can drop it from the
parameters.
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/volumes.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 7fabbbae3c62..4576f0e69d33 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3561,10 +3561,10 @@ static int chunk_soft_convert_filter(u64 chunk_type, return 0; } -static int should_balance_chunk(struct btrfs_fs_info *fs_info, - struct extent_buffer *leaf, +static int should_balance_chunk(struct extent_buffer *leaf, struct btrfs_chunk *chunk, u64 chunk_offset) { + struct btrfs_fs_info *fs_info = leaf->fs_info; struct btrfs_balance_control *bctl = fs_info->balance_ctl; struct btrfs_balance_args *bargs = NULL; u64 chunk_type = btrfs_chunk_type(leaf, chunk); @@ -3744,8 +3744,7 @@ again: spin_unlock(&fs_info->balance_lock); } - ret = should_balance_chunk(fs_info, leaf, chunk, - found_key.offset); + ret = should_balance_chunk(leaf, chunk, found_key.offset); btrfs_release_path(path); if (!ret) { |