Commit ac0ecda
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.
No functional change.
Signed-off-by: Sun YangKai <sunk67188@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent bae7d4c commit ac0ecda
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4520 | 4520 | | |
4521 | 4521 | | |
4522 | 4522 | | |
4523 | | - | |
4524 | | - | |
4525 | | - | |
| 4523 | + | |
4526 | 4524 | | |
4527 | 4525 | | |
4528 | 4526 | | |
| |||
0 commit comments