btrfs: Remove fs_info from run_delayed_tree_ref
authorNikolay Borisov <nborisov@suse.com>
Wed, 20 Jun 2018 12:49:04 +0000 (15:49 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:35 +0000 (13:12 +0200)
It can always be referneced from the passed transaction handle since
it's always valid. 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/extent-tree.c

index 9f630298ea117e1c608b5f58a0569ddb65b018b3..c7a66dd434fc97fbb1b897f4b92ec6c096bdde24 100644 (file)
@@ -2443,7 +2443,6 @@ out:
 }
 
 static int run_delayed_tree_ref(struct btrfs_trans_handle *trans,
-                               struct btrfs_fs_info *fs_info,
                                struct btrfs_delayed_ref_node *node,
                                struct btrfs_delayed_extent_op *extent_op,
                                int insert_reserved)
@@ -2454,14 +2453,14 @@ static int run_delayed_tree_ref(struct btrfs_trans_handle *trans,
        u64 ref_root = 0;
 
        ref = btrfs_delayed_node_to_tree_ref(node);
-       trace_run_delayed_tree_ref(fs_info, node, ref, node->action);
+       trace_run_delayed_tree_ref(trans->fs_info, node, ref, node->action);
 
        if (node->type == BTRFS_SHARED_BLOCK_REF_KEY)
                parent = ref->parent;
        ref_root = ref->root;
 
        if (node->ref_mod != 1) {
-               btrfs_err(fs_info,
+               btrfs_err(trans->fs_info,
        "btree block(%llu) has %d references rather than 1: action %d ref_root %llu parent %llu",
                          node->bytenr, node->ref_mod, node->action, ref_root,
                          parent);
@@ -2500,7 +2499,7 @@ static int run_one_delayed_ref(struct btrfs_trans_handle *trans,
 
        if (node->type == BTRFS_TREE_BLOCK_REF_KEY ||
            node->type == BTRFS_SHARED_BLOCK_REF_KEY)
-               ret = run_delayed_tree_ref(trans, fs_info, node, extent_op,
+               ret = run_delayed_tree_ref(trans, node, extent_op,
                                           insert_reserved);
        else if (node->type == BTRFS_EXTENT_DATA_REF_KEY ||
                 node->type == BTRFS_SHARED_DATA_REF_KEY)