* [PATCH] btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down
@ 2018-12-10 7:01 Qu Wenruo
2018-12-10 7:12 ` Nikolay Borisov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Qu Wenruo @ 2018-12-10 7:01 UTC (permalink / raw)
To: linux-btrfs
@blocksize variable in do_walk_down() is only used once, really no need
to declare it.
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
fs/btrfs/extent-tree.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 225698b588c4..6744f2fa2b03 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -8577,7 +8577,6 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans,
u64 bytenr;
u64 generation;
u64 parent;
- u32 blocksize;
struct btrfs_key key;
struct btrfs_key first_key;
struct extent_buffer *next;
@@ -8602,7 +8601,6 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans,
bytenr = btrfs_node_blockptr(path->nodes[level], path->slots[level]);
btrfs_node_key_to_cpu(path->nodes[level], &first_key,
path->slots[level]);
- blocksize = fs_info->nodesize;
next = find_extent_buffer(fs_info, bytenr);
if (!next) {
@@ -8726,7 +8724,7 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans,
ret);
}
}
- ret = btrfs_free_extent(trans, root, bytenr, blocksize,
+ ret = btrfs_free_extent(trans, root, bytenr, fs_info->nodesize,
parent, root->root_key.objectid,
level - 1, 0, false);
if (ret)
--
2.19.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down
2018-12-10 7:01 [PATCH] btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down Qu Wenruo
@ 2018-12-10 7:12 ` Nikolay Borisov
2018-12-10 8:39 ` Johannes Thumshirn
2018-12-11 16:28 ` David Sterba
2 siblings, 0 replies; 4+ messages in thread
From: Nikolay Borisov @ 2018-12-10 7:12 UTC (permalink / raw)
To: Qu Wenruo, linux-btrfs
On 10.12.18 г. 9:01 ч., Qu Wenruo wrote:
> @blocksize variable in do_walk_down() is only used once, really no need
> to declare it.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
> fs/btrfs/extent-tree.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index 225698b588c4..6744f2fa2b03 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -8577,7 +8577,6 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans,
> u64 bytenr;
> u64 generation;
> u64 parent;
> - u32 blocksize;
> struct btrfs_key key;
> struct btrfs_key first_key;
> struct extent_buffer *next;
> @@ -8602,7 +8601,6 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans,
> bytenr = btrfs_node_blockptr(path->nodes[level], path->slots[level]);
> btrfs_node_key_to_cpu(path->nodes[level], &first_key,
> path->slots[level]);
> - blocksize = fs_info->nodesize;
>
> next = find_extent_buffer(fs_info, bytenr);
> if (!next) {
> @@ -8726,7 +8724,7 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans,
> ret);
> }
> }
> - ret = btrfs_free_extent(trans, root, bytenr, blocksize,
> + ret = btrfs_free_extent(trans, root, bytenr, fs_info->nodesize,
> parent, root->root_key.objectid,
> level - 1, 0, false);
> if (ret)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down
2018-12-10 7:01 [PATCH] btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down Qu Wenruo
2018-12-10 7:12 ` Nikolay Borisov
@ 2018-12-10 8:39 ` Johannes Thumshirn
2018-12-11 16:28 ` David Sterba
2 siblings, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2018-12-10 8:39 UTC (permalink / raw)
To: Qu Wenruo, linux-btrfs
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn SUSE Labs Filesystems
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down
2018-12-10 7:01 [PATCH] btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down Qu Wenruo
2018-12-10 7:12 ` Nikolay Borisov
2018-12-10 8:39 ` Johannes Thumshirn
@ 2018-12-11 16:28 ` David Sterba
2 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2018-12-11 16:28 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs
On Mon, Dec 10, 2018 at 03:01:03PM +0800, Qu Wenruo wrote:
> @blocksize variable in do_walk_down() is only used once, really no need
> to declare it.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Added to misc-next, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-11 16:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 7:01 [PATCH] btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down Qu Wenruo
2018-12-10 7:12 ` Nikolay Borisov
2018-12-10 8:39 ` Johannes Thumshirn
2018-12-11 16:28 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).