block: Allow inactivating already inactive nodes
authorKevin Wolf <kwolf@redhat.com>
Tue, 4 Feb 2025 21:13:53 +0000 (22:13 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 6 Feb 2025 13:26:51 +0000 (14:26 +0100)
commita6490ec9d56b9e95a13918813585a3a9891710bc
tree01af06965c6ab713aaa9ace8e5c894966bef9089
parentaec81049c2daa8a97b89e59f03733b21ae0f8c2d
block: Allow inactivating already inactive nodes

What we wanted to catch with the assertion is cases where the recursion
finds that a child was inactive before its parent. This should never
happen. But if the user tries to inactivate an image that is already
inactive, that's harmless and we don't want to fail the assertion.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20250204211407.381505-3-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c