]> xenbits.xensource.com Git - qemu-xen.git/commit
block: bdrv_insert_node(): fix and improve error handling
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Mon, 20 Sep 2021 11:55:35 +0000 (14:55 +0300)
committerKevin Wolf <kwolf@redhat.com>
Wed, 6 Oct 2021 08:25:55 +0000 (10:25 +0200)
commitf053b7e8005d7f72c2a8e686c4779f75b0ae631f
tree6f02a1143c37f024ba84d8cf1ced3b787a227561
parent621d17378a40509757d5e03eb1c2f5305ff76df3
block: bdrv_insert_node(): fix and improve error handling

 - use ERRP_GUARD(): function calls error_prepend(), so it must use
   ERRP_GUARD(), otherwise error_prepend() would not be called when
   passed errp is error_fatal

 - drop error propagation, handle return code instead

 - for symmetry, do error_prepend() for the second failure

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210920115538.264372-3-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c