forked from Mirrors/btrfs-progs
btrfs-progs: impossible BUG_ON meant to test empty
old_left_nritems is unsigned so BUG_ON(old_left_nritems < 0) is impossible. Presumably the BUG_ON() meant to test that it wasn't 0 so that btrfs_item_offset_nr() doesn't get a nr of -1. Signed-off-by: Zach Brown <zab@redhat.com>master
parent
7c9f323a7c
commit
fd732dd81a
2
ctree.c
2
ctree.c
|
@ -1960,7 +1960,7 @@ static int push_leaf_left(struct btrfs_trans_handle *trans, struct btrfs_root
|
|||
btrfs_item_offset_nr(right, push_items - 1),
|
||||
push_space);
|
||||
old_left_nritems = btrfs_header_nritems(left);
|
||||
BUG_ON(old_left_nritems < 0);
|
||||
BUG_ON(old_left_nritems == 0);
|
||||
|
||||
old_left_item_size = btrfs_item_offset_nr(left, old_left_nritems - 1);
|
||||
for (i = old_left_nritems; i < old_left_nritems + push_items; i++) {
|
||||
|
|
Loading…
Reference in New Issue