]> www.infradead.org Git - nvme.git/commit
btrfs: remove local variable need_account in do_walk_down()
authorJosef Bacik <josef@toxicpanda.com>
Tue, 7 May 2024 18:12:07 +0000 (14:12 -0400)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:24 +0000 (15:33 +0200)
commit4c4686d19dbaaaf46c5ac295e6e27580d514c4f5
tree95f120e1b6fca0595b9afa7538b21ab32d6d8e0b
parent562d425454e8b8ee628fafb15e88b0ef7ec371e6
btrfs: remove local variable need_account in do_walk_down()

We only set this if wc->refs[level - 1] > 1, and we check this way up
above where we need it because the first thing we do before dropping our
refs is reset wc->refs[level - 1] to 0.  Reorder resetting of wc->refs
to after our drop logic, and then remove the need_account variable and
simply check wc->refs[level - 1] directly instead of using a variable.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c