btrfs: drop fs_info parameter from tree_mod_log_free_eb
authorDavid Sterba <dsterba@suse.com>
Mon, 5 Mar 2018 14:14:25 +0000 (15:14 +0100)
committerDavid Sterba <dsterba@suse.com>
Fri, 30 Mar 2018 23:26:53 +0000 (01:26 +0200)
It's provided by the extent_buffer.

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

index 960d2c1008bfb46a49b17636a34fbf93250effc3..b3c4305b5ecd5fb5506ce1b4a01dc6cb140a4e76 100644 (file)
@@ -41,8 +41,6 @@ static int balance_node_right(struct btrfs_trans_handle *trans,
                              struct extent_buffer *src_buf);
 static void del_ptr(struct btrfs_root *root, struct btrfs_path *path,
                    int level, int slot);
-static int tree_mod_log_free_eb(struct btrfs_fs_info *fs_info,
-                                struct extent_buffer *eb);
 
 struct btrfs_path *btrfs_alloc_path(void)
 {
@@ -882,8 +880,7 @@ static noinline void tree_mod_log_set_node_key(struct extent_buffer *eb,
        BUG_ON(ret < 0);
 }
 
-static noinline int
-tree_mod_log_free_eb(struct btrfs_fs_info *fs_info, struct extent_buffer *eb)
+static noinline int tree_mod_log_free_eb(struct extent_buffer *eb)
 {
        struct tree_mod_elem **tm_list = NULL;
        int nritems = 0;
@@ -893,7 +890,7 @@ tree_mod_log_free_eb(struct btrfs_fs_info *fs_info, struct extent_buffer *eb)
        if (btrfs_header_level(eb) == 0)
                return 0;
 
-       if (!tree_mod_need_log(fs_info, NULL))
+       if (!tree_mod_need_log(eb->fs_info, NULL))
                return 0;
 
        nritems = btrfs_header_nritems(eb);
@@ -910,11 +907,11 @@ tree_mod_log_free_eb(struct btrfs_fs_info *fs_info, struct extent_buffer *eb)
                }
        }
 
-       if (tree_mod_dont_log(fs_info, eb))
+       if (tree_mod_dont_log(eb->fs_info, eb))
                goto free_tms;
 
-       ret = __tree_mod_log_free_eb(fs_info, tm_list, nritems);
-       tree_mod_log_write_unlock(fs_info);
+       ret = __tree_mod_log_free_eb(eb->fs_info, tm_list, nritems);
+       tree_mod_log_write_unlock(eb->fs_info);
        if (ret)
                goto free_tms;
        kfree(tm_list);
@@ -1183,7 +1180,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
                                              trans->transid);
                btrfs_mark_buffer_dirty(parent);
                if (last_ref) {
-                       ret = tree_mod_log_free_eb(fs_info, buf);
+                       ret = tree_mod_log_free_eb(buf);
                        if (ret) {
                                btrfs_abort_transaction(trans, ret);
                                return ret;