]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
btrfs: Remove fs_info from btrfs_alloc_logged_file_extent
authorNikolay Borisov <nborisov@suse.com>
Wed, 20 Jun 2018 12:49:13 +0000 (15:49 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:37 +0000 (13:12 +0200)
It can be referenced from trans since the function is always called
within a valid transaction.

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/tree-log.c

index db97e34aa11384750e1bf92dddd349b47b8aa25f..bc4bb275e339792a72c8ee29ed33bc553e212fe9 100644 (file)
@@ -2676,7 +2676,6 @@ int btrfs_alloc_reserved_file_extent(struct btrfs_trans_handle *trans,
                                     u64 offset, u64 ram_bytes,
                                     struct btrfs_key *ins);
 int btrfs_alloc_logged_file_extent(struct btrfs_trans_handle *trans,
-                                  struct btrfs_fs_info *fs_info,
                                   u64 root_objectid, u64 owner, u64 offset,
                                   struct btrfs_key *ins);
 int btrfs_reserve_extent(struct btrfs_root *root, u64 ram_bytes, u64 num_bytes,
index 004c4e0fce367c582ab172f48b08369ecbe34362..c27215dc8b840538bd04b5e29cc516b54affa77c 100644 (file)
@@ -8263,10 +8263,10 @@ int btrfs_alloc_reserved_file_extent(struct btrfs_trans_handle *trans,
  * space cache bits as well
  */
 int btrfs_alloc_logged_file_extent(struct btrfs_trans_handle *trans,
-                                  struct btrfs_fs_info *fs_info,
                                   u64 root_objectid, u64 owner, u64 offset,
                                   struct btrfs_key *ins)
 {
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        int ret;
        struct btrfs_block_group_cache *block_group;
        struct btrfs_space_info *space_info;
index 7f6aaeb4bd226817b5b952fb72c4a55ac0154f83..b3b1d424f2d8be3328c5a50afc464fc33777a20d 100644 (file)
@@ -715,7 +715,6 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
                                 * allocation tree
                                 */
                                ret = btrfs_alloc_logged_file_extent(trans,
-                                               fs_info,
                                                root->root_key.objectid,
                                                key->objectid, offset, &ins);
                                if (ret)