btrfs: get fs_info from eb in btrfs_leaf_free_space
We can read fs_info from extent buffer and can drop it from the parameters. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -691,7 +691,6 @@ static int btrfs_batch_insert_items(struct btrfs_root *root,
|
||||
struct btrfs_path *path,
|
||||
struct btrfs_delayed_item *item)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = root->fs_info;
|
||||
struct btrfs_delayed_item *curr, *next;
|
||||
int free_space;
|
||||
int total_data_size = 0, total_size = 0;
|
||||
@@ -708,7 +707,7 @@ static int btrfs_batch_insert_items(struct btrfs_root *root,
|
||||
BUG_ON(!path->nodes[0]);
|
||||
|
||||
leaf = path->nodes[0];
|
||||
free_space = btrfs_leaf_free_space(fs_info, leaf);
|
||||
free_space = btrfs_leaf_free_space(leaf);
|
||||
INIT_LIST_HEAD(&head);
|
||||
|
||||
next = item;
|
||||
|
Reference in New Issue
Block a user