Skip to content

Commit 60ac802

Browse files
fdmananakdave
authored andcommitted
btrfs: rename root to log in walk_down_log_tree() and walk_up_log_tree()
Everywhere we have a log root we name it as 'log' or 'log_root' except in walk_down_log_tree() and walk_up_log_tree() where we name it as 'root', which not only it's inconsistent, it's also confusing since we typically use 'root' when naming variables that refer to a subvolume tree. So for clairty and consistency rename the 'root' argument to 'log'. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 2c123db commit 60ac802

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

fs/btrfs/tree-log.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2779,11 +2779,11 @@ static int clean_log_buffer(struct btrfs_trans_handle *trans,
27792779
}
27802780

27812781
static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
2782-
struct btrfs_root *root,
2782+
struct btrfs_root *log,
27832783
struct btrfs_path *path, int *level,
27842784
struct walk_control *wc)
27852785
{
2786-
struct btrfs_fs_info *fs_info = root->fs_info;
2786+
struct btrfs_fs_info *fs_info = log->fs_info;
27872787
u64 bytenr;
27882788
u64 ptr_gen;
27892789
struct extent_buffer *next;
@@ -2821,8 +2821,7 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
28212821
}
28222822

28232823
if (*level == 1) {
2824-
ret = wc->process_func(root, next, wc, ptr_gen,
2825-
*level - 1);
2824+
ret = wc->process_func(log, next, wc, ptr_gen, *level - 1);
28262825
if (ret) {
28272826
free_extent_buffer(next);
28282827
return ret;
@@ -2873,7 +2872,7 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
28732872
}
28742873

28752874
static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans,
2876-
struct btrfs_root *root,
2875+
struct btrfs_root *log,
28772876
struct btrfs_path *path, int *level,
28782877
struct walk_control *wc)
28792878
{
@@ -2889,7 +2888,7 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans,
28892888
WARN_ON(*level == 0);
28902889
return 0;
28912890
} else {
2892-
ret = wc->process_func(root, path->nodes[*level], wc,
2891+
ret = wc->process_func(log, path->nodes[*level], wc,
28932892
btrfs_header_generation(path->nodes[*level]),
28942893
*level);
28952894
if (ret)

0 commit comments

Comments
 (0)