aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2019-09-20 11:25:42 +0300
committerJohn Snow <jsnow@redhat.com>2019-10-17 17:02:32 -0400
commitb56a1e31759b750e111b4dd35171007bf493fc89 (patch)
treee2fd29a5f696b9cae6f79dd6e0c6b5031ff1d067 /blockdev.c
parent85cc8a4f6b515404448de7f22db403807152b657 (diff)
block/dirty-bitmap: return int from bdrv_remove_persistent_dirty_bitmap
It's more comfortable to not deal with local_err. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20190920082543.23444-3-vsementsov@virtuozzo.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/blockdev.c b/blockdev.c
index f89e48fc79..a45458a60a 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2940,15 +2940,14 @@ static BdrvDirtyBitmap *do_block_dirty_bitmap_remove(
}
if (bdrv_dirty_bitmap_get_persistence(bitmap)) {
+ int ret;
AioContext *aio_context = bdrv_get_aio_context(bs);
- Error *local_err = NULL;
aio_context_acquire(aio_context);
- bdrv_remove_persistent_dirty_bitmap(bs, name, &local_err);
+ ret = bdrv_remove_persistent_dirty_bitmap(bs, name, errp);
aio_context_release(aio_context);
- if (local_err != NULL) {
- error_propagate(errp, local_err);
+ if (ret < 0) {
return NULL;
}
}