]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add btrfs_set_item_*_nr() helpers
authorJosef Bacik <josef@toxicpanda.com>
Thu, 21 Oct 2021 18:58:32 +0000 (14:58 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Jan 2022 14:09:42 +0000 (15:09 +0100)
commitf0f77033fc3f79c2ecc6f4f938eea1c7ba8e597c
treef99cf42dc6cc5585497d8480a75ca8545b3e0fb8
parent3bfe6c9550f3180b28a16fdd934f387b512418d9
btrfs: add btrfs_set_item_*_nr() helpers

We have the pattern of

item = btrfs_item_nr(slot);
btrfs_set_item_*(leaf, item);

in a bunch of places in our code.  Fix this by adding
btrfs_set_item_*_nr() helpers which will do the appropriate work, and
replace those calls with

btrfs_set_item_*_nr(leaf, slot);

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/ctree.c
fs/btrfs/ctree.h