]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: set delayed item type when initializing it
authorFilipe Manana <fdmanana@suse.com>
Tue, 31 May 2022 15:06:42 +0000 (16:06 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:44:36 +0000 (17:44 +0200)
commit7145fff86105dfb094978d8ad56569f71b286e57
tree9a4a980a8202cb34304acab5631550f8aebfe5a2
parent95e55f818b5b330934b75e15693435c9660c48f5
btrfs: set delayed item type when initializing it

Currently we set the type of a delayed item only after successfully
inserting it into its respective rbtree. This is fine, as the type
is not used anywhere before that point, but for the next patch in the
series, there will be the need to check the type of a delayed item
before inserting it into a rbtree.

So set the type of a delayed item immediately after allocating it.
This also makes the trivial wrappers for adding insertion and deletion
useless, so it removes them as well.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-inode.c