btrfs: Remove fs_info from btrfs_remove_block_group
authorNikolay Borisov <nborisov@suse.com>
Wed, 20 Jun 2018 12:48:56 +0000 (15:48 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:34 +0000 (13:12 +0200)
This function is always called with a valid transaction handle from
where we can reference fs_info. No functional changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/volumes.c

index b77f9ac699c17204fd823e0dc4f31745b2a85542..7df6739e8eca2ea546aa8da1c427566a2c04f421 100644 (file)
@@ -2723,8 +2723,7 @@ struct btrfs_trans_handle *btrfs_start_trans_remove_block_group(
                                struct btrfs_fs_info *fs_info,
                                const u64 chunk_offset);
 int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
-                            struct btrfs_fs_info *fs_info, u64 group_start,
-                            struct extent_map *em);
+                            u64 group_start, struct extent_map *em);
 void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info);
 void btrfs_get_block_group_trimming(struct btrfs_block_group_cache *cache);
 void btrfs_put_block_group_trimming(struct btrfs_block_group_cache *cache);
index fa78a0175f804db7140b589dbd3b1e1e7d3ba9ff..cb1716caf11b2e3332886a3c4aece43f498c920f 100644 (file)
@@ -10334,9 +10334,9 @@ static void clear_avail_alloc_bits(struct btrfs_fs_info *fs_info, u64 flags)
 }
 
 int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
-                            struct btrfs_fs_info *fs_info, u64 group_start,
-                            struct extent_map *em)
+                            u64 group_start, struct extent_map *em)
 {
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        struct btrfs_root *root = fs_info->extent_root;
        struct btrfs_path *path;
        struct btrfs_block_group_cache *block_group;
index e806669dc43a5c0402cd2b7170c497cf3dcdbbc8..ff7c8cdacd851d5effff85f8d94d71f01fcad81a 100644 (file)
@@ -2885,7 +2885,7 @@ int btrfs_remove_chunk(struct btrfs_trans_handle *trans,
                }
        }
 
-       ret = btrfs_remove_block_group(trans, fs_info, chunk_offset, em);
+       ret = btrfs_remove_block_group(trans, chunk_offset, em);
        if (ret) {
                btrfs_abort_transaction(trans, ret);
                goto out;