[PATCH 1/3] btrfs: remove set but not used variable 'root_owner'

From: yu kuai
Date: Wed Feb 19 2020 - 06:23:06 EST


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.

Signed-off-by: yu kuai <yukuai3@xxxxxxxxxx>
---
fs/btrfs/tree-log.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 5e6b18924e00..156beda01b18 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -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);
--
2.17.2