diff options
author | David Sterba <dsterba@suse.com> | 2018-03-05 15:03:52 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-03-31 01:26:53 +0200 |
commit | 6074d45f60760f7a8aa34883f37cd4d54cd5855e (patch) | |
tree | cb580d3f99197601f8ba1791d4987abe67621acf /fs | |
parent | 3ac6de1abd7a485f48948af9ef18139500eef9ae (diff) | |
download | linux-6074d45f60760f7a8aa34883f37cd4d54cd5855e.tar.bz2 |
btrfs: drop fs_info parameter from tree_mod_log_insert_move
It's provided by the extent_buffer.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ctree.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 62aa776c77d1..0358ed3e1562 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -564,10 +564,8 @@ tree_mod_log_insert_key(struct btrfs_fs_info *fs_info, return ret; } -static noinline int -tree_mod_log_insert_move(struct btrfs_fs_info *fs_info, - struct extent_buffer *eb, int dst_slot, int src_slot, - int nr_items) +static noinline int tree_mod_log_insert_move(struct extent_buffer *eb, + int dst_slot, int src_slot, int nr_items) { struct tree_mod_elem *tm = NULL; struct tree_mod_elem **tm_list = NULL; @@ -575,7 +573,7 @@ tree_mod_log_insert_move(struct btrfs_fs_info *fs_info, int i; int locked = 0; - if (!tree_mod_need_log(fs_info, eb)) + if (!tree_mod_need_log(eb->fs_info, eb)) return 0; tm_list = kcalloc(nr_items, sizeof(struct tree_mod_elem *), GFP_NOFS); @@ -603,7 +601,7 @@ tree_mod_log_insert_move(struct btrfs_fs_info *fs_info, } } - if (tree_mod_dont_log(fs_info, eb)) + if (tree_mod_dont_log(eb->fs_info, eb)) goto free_tms; locked = 1; @@ -613,26 +611,26 @@ tree_mod_log_insert_move(struct btrfs_fs_info *fs_info, * buffer, i.e. dst_slot < src_slot. */ for (i = 0; i + dst_slot < src_slot && i < nr_items; i++) { - ret = __tree_mod_log_insert(fs_info, tm_list[i]); + ret = __tree_mod_log_insert(eb->fs_info, tm_list[i]); if (ret) goto free_tms; } - ret = __tree_mod_log_insert(fs_info, tm); + ret = __tree_mod_log_insert(eb->fs_info, tm); if (ret) goto free_tms; - tree_mod_log_write_unlock(fs_info); + tree_mod_log_write_unlock(eb->fs_info); kfree(tm_list); return 0; free_tms: for (i = 0; i < nr_items; i++) { if (tm_list[i] && !RB_EMPTY_NODE(&tm_list[i]->node)) - rb_erase(&tm_list[i]->node, &fs_info->tree_mod_log); + rb_erase(&tm_list[i]->node, &eb->fs_info->tree_mod_log); kfree(tm_list[i]); } if (locked) - tree_mod_log_write_unlock(fs_info); + tree_mod_log_write_unlock(eb->fs_info); kfree(tm_list); kfree(tm); @@ -872,8 +870,7 @@ tree_mod_log_eb_move(struct btrfs_fs_info *fs_info, struct extent_buffer *dst, int dst_offset, int src_offset, int nr_items) { int ret; - ret = tree_mod_log_insert_move(fs_info, dst, dst_offset, src_offset, - nr_items); + ret = tree_mod_log_insert_move(dst, dst_offset, src_offset, nr_items); BUG_ON(ret < 0); } |