btrfs: remove set but not used variable 'root_owner'
PATCH 1/3 btrfs: remove set but not used variable 'root_owner'
Fixes gcc '-Wunused-but-set-variable' warning:
fs/btrfs/tree-log.c: In function ‘walk_down_log_tree’:fs/btrfs/tree-log.c:2698:6: warning: variable ‘root_owner’ set but not used [-Wunused-but-set-variable] fs/btrfs/tree-log.c: In function ‘walk_up_log_tree’:fs/btrfs/tree-log.c:2793:6: warning: variable ‘root_owner’ set but not used [-Wunused-but-set-variable]
They are never used, and so can be removed.
--- fs/btrfs/tree-log.c | 4 ---- 1 file changed, 4 deletions(-)
fs/btrfs/tree-log.c +0 -4
@@ -2695,7 +2695,6 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans, struct walk_control *wc) {struct btrfs_fs_info *fs_info = root->fs_info; -u64 root_owner;u64 bytenr;u64 ptr_gen;struct extent_buffer *next;
@@ -2721,7 +2720,6 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans, blocksize = fs_info->nodesize; parent = path->nodes[*level]; - root_owner =btrfs_header_owner (parent); next =btrfs_find_create_tree_block (fs_info, bytenr);if (IS_ERR (next))
@@ -2790,7 +2788,6 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans, struct walk_control *wc) {struct btrfs_fs_info *fs_info = root->fs_info; -u64 root_owner;int i;int slot;int ret;
@@ -2809,7 +2806,6 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans,else parent = path->nodes[*level +1 ]; - root_owner =btrfs_header_owner (parent); ret = wc->process_func (root, path->nodes[*level], wc,btrfs_header_generation (path->nodes[*level]), *level);
Signature · 1 line
2.17.2
Quoted 9 lines · yu kuai
Fixes gcc '-Wunused-but-set-variable' warning:
fs/btrfs/tree-log.c: In function ‘walk_down_log_tree’:fs/btrfs/tree-log.c:2698:6: warning: variable ‘root_owner’ set but not used [-Wunused-but-set-variable]fs/btrfs/tree-log.c: In function ‘walk_up_log_tree’:fs/btrfs/tree-log.c:2793:6: warning: variable ‘root_owner’ set but not used [-Wunused-but-set-variable]
Quoted 3 lines
They are never used, and so can be removed.
Signed-off-by yu kuai <[email protected]>
Yep, can be squashed into :e084c5ab48f9 ("btrfs: Call btrfs_pin_reserved_extent only during active transaction")
in any case: