]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
btrfs: get fs_info from trans in copy_for_split
authorDavid Sterba <dsterba@suse.com>
Wed, 20 Mar 2019 13:42:33 +0000 (14:42 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:42 +0000 (19:02 +0200)
We can read fs_info from the transaction and can drop it from the
parameters.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c

index f779104ab199eaa2e607877c31457c7a29941db6..f52eb952597b17a12422d4bcc21fa47daf3340b6 100644 (file)
@@ -4044,12 +4044,12 @@ static int push_leaf_left(struct btrfs_trans_handle *trans, struct btrfs_root
  * available for the resulting leaf level of the path.
  */
 static noinline void copy_for_split(struct btrfs_trans_handle *trans,
-                                   struct btrfs_fs_info *fs_info,
                                    struct btrfs_path *path,
                                    struct extent_buffer *l,
                                    struct extent_buffer *right,
                                    int slot, int mid, int nritems)
 {
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        int data_copy_size;
        int rt_data_off;
        int i;
@@ -4316,7 +4316,7 @@ static noinline int split_leaf(struct btrfs_trans_handle *trans,
                return ret;
        }
 
-       copy_for_split(trans, fs_info, path, l, right, slot, mid, nritems);
+       copy_for_split(trans, path, l, right, slot, mid, nritems);
 
        if (split == 2) {
                BUG_ON(num_doubles != 0);