Message ID | 20200219112148.16914-1-yukuai3@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] btrfs: remove set but not used variable 'root_owner' | expand |
On 19.02.20 г. 13:21 ч., yu kuai wrote: > 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@huawei.com> Yep, can be squashed into : e084c5ab48f9 ("btrfs: Call btrfs_pin_reserved_extent only during active transaction") in any case: Reviewed-by: Nikolay Borisov <nborisov@suse.com>
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);
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@huawei.com> --- fs/btrfs/tree-log.c | 4 ---- 1 file changed, 4 deletions(-)