Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e72cb923 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba
Browse files

btrfs: Remove fs_info from __btrfs_free_extent



This function is always called with a valid transaction handle so we
can reference the fs_info from there. No functional changes.

Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 5a98ec01
Loading
Loading
Loading
Loading
+11 −13
Original line number Original line Diff line number Diff line
@@ -52,7 +52,6 @@ enum {
};
};


static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
			       struct btrfs_fs_info *fs_info,
			       struct btrfs_delayed_ref_node *node, u64 parent,
			       struct btrfs_delayed_ref_node *node, u64 parent,
			       u64 root_objectid, u64 owner_objectid,
			       u64 root_objectid, u64 owner_objectid,
			       u64 owner_offset, int refs_to_drop,
			       u64 owner_offset, int refs_to_drop,
@@ -2327,7 +2326,7 @@ static int run_delayed_data_ref(struct btrfs_trans_handle *trans,
					     ref->offset, node->ref_mod,
					     ref->offset, node->ref_mod,
					     extent_op);
					     extent_op);
	} else if (node->action == BTRFS_DROP_DELAYED_REF) {
	} else if (node->action == BTRFS_DROP_DELAYED_REF) {
		ret = __btrfs_free_extent(trans, fs_info, node, parent,
		ret = __btrfs_free_extent(trans, node, parent,
					  ref_root, ref->objectid,
					  ref_root, ref->objectid,
					  ref->offset, node->ref_mod,
					  ref->offset, node->ref_mod,
					  extent_op);
					  extent_op);
@@ -2480,8 +2479,7 @@ static int run_delayed_tree_ref(struct btrfs_trans_handle *trans,
					     ref->level, 0, 1,
					     ref->level, 0, 1,
					     extent_op);
					     extent_op);
	} else if (node->action == BTRFS_DROP_DELAYED_REF) {
	} else if (node->action == BTRFS_DROP_DELAYED_REF) {
		ret = __btrfs_free_extent(trans, fs_info, node,
		ret = __btrfs_free_extent(trans, node, parent, ref_root,
					  parent, ref_root,
					  ref->level, 0, 1, extent_op);
					  ref->level, 0, 1, extent_op);
	} else {
	} else {
		BUG();
		BUG();
@@ -6840,12 +6838,12 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans)
}
}


static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
				struct btrfs_fs_info *info,
			       struct btrfs_delayed_ref_node *node, u64 parent,
			       struct btrfs_delayed_ref_node *node, u64 parent,
			       u64 root_objectid, u64 owner_objectid,
			       u64 root_objectid, u64 owner_objectid,
			       u64 owner_offset, int refs_to_drop,
			       u64 owner_offset, int refs_to_drop,
			       struct btrfs_delayed_extent_op *extent_op)
			       struct btrfs_delayed_extent_op *extent_op)
{
{
	struct btrfs_fs_info *info = trans->fs_info;
	struct btrfs_key key;
	struct btrfs_key key;
	struct btrfs_path *path;
	struct btrfs_path *path;
	struct btrfs_root *extent_root = info->extent_root;
	struct btrfs_root *extent_root = info->extent_root;