mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
btrfs: factor out root promotion logic into promote_child_to_root()
The balance_level() function is overly long and contains a cold code path that handles promoting a child node to root when the root has only one item. This code has distinct logic that is clearer and more maintainable when isolated in its own function. Signed-off-by: Sun YangKai <sunk67188@gmail.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
1a332a6d70
commit
31b37b7667
1 changed files with 70 additions and 46 deletions
116
fs/btrfs/ctree.c
116
fs/btrfs/ctree.c
Loading…
Add table
Add a link
Reference in a new issue