forked from Minki/linux
btrfs: convert BUG() for pending_del_nr into an ASSERT
This is a logic correctness check, convert it into an ASSERT() instead of a BUG(). Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
56e1edb0e3
commit
376b91d570
@ -651,6 +651,9 @@ delete:
|
||||
else
|
||||
control->last_size = new_size;
|
||||
if (del_item) {
|
||||
ASSERT(!pending_del_nr ||
|
||||
((path->slots[0] + 1) == pending_del_slot));
|
||||
|
||||
if (!pending_del_nr) {
|
||||
/* No pending yet, add ourselves */
|
||||
pending_del_slot = path->slots[0];
|
||||
@ -660,8 +663,6 @@ delete:
|
||||
/* Hop on the pending chunk */
|
||||
pending_del_nr++;
|
||||
pending_del_slot = path->slots[0];
|
||||
} else {
|
||||
BUG();
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user