diff options
| author | Sun YangKai <sunk67188@gmail.com> | 2025-11-14 15:24:48 +0800 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-25 01:50:56 +0100 |
| commit | 4357dd76f558f03fe22f28c360f7798ee3a0d238 (patch) | |
| tree | b85b9d3431f600f1648218085a60c74d79001a20 /tools/lib/python | |
| parent | 139f75a3b1677c76bd845228ec49e50d69ce556e (diff) | |
btrfs: remove redundant level reset in btrfs_del_items()
When btrfs_del_items() empties a leaf, it deletes the leaf unless it's
the root node. For the root leaf case, the code used to reset its level
to 0 via btrfs_set_header_level(). This is redundant as leaf nodes
always have level == 0.
Remove the unnecessary level assignment and invert the conditional to
handle only the non-root leaf deletion. The root leaf is correctly left
as-is.
Signed-off-by: Sun YangKai <sunk67188@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
