]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Streamline shared ref check in alloc_reserved_tree_block
authorNikolay Borisov <nborisov@suse.com>
Mon, 21 May 2018 09:27:23 +0000 (12:27 +0300)
committerDavid Sterba <dsterba@suse.com>
Tue, 29 May 2018 16:12:57 +0000 (18:12 +0200)
commit175d4f051eba1988940fccf546f03fc695558482
treeadd57f9abc7c662f8cf158698bf43bd40eeeb3af
parentc9d37e2f6e2fd64f7224db9075eeef66ac98fc00
btrfs: Streamline shared ref check in alloc_reserved_tree_block

Instead of setting "parent" to ref->parent only when dealing with
a shared ref and subsequently performing another check to see
if (parent > 0), check the "node->type" directly and act accordingly.
This makes the code more streamline. No functional changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c