qcow2: remove invalid qcow2_check_refcounts calls
Those DEBUG_ALLOC-guarded are dead code incorrectly calling coroutine fn from non-coroutine. Remove it. Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Fixes: 70bacc44532 ("qcow2: mark more functions as coroutine_fns and GRAPH_RDLOCK") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Marc-André Lureau committed
Jul 20, 2026 at 00:00 UTC
c15ca7cf9859140918292c5a99b9acb0a3b39c2e
1 file changed
-18
block/qcow2-snapshot.c
-18
@@ -740,12 +740,6 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
740
ROUND_UP(sn->vm_state_size, s->cluster_size),
741
QCOW2_DISCARD_NEVER, false);
742
743
-#ifdef DEBUG_ALLOC
744
- {
745
- BdrvCheckResult result = {0};
746
- qcow2_check_refcounts(bs, &result, 0);
747
- }
748
-#endif
743
return 0;
744
745
fail:
@@ -893,12 +887,6 @@ int qcow2_snapshot_goto(BlockDriverState *bs, const char *snapshot_id)
887
goto fail;
888
}
889
896
-#ifdef DEBUG_ALLOC
897
- {
898
- BdrvCheckResult result = {0};
899
- qcow2_check_refcounts(bs, &result, 0);
900
- }
901
-#endif
890
return 0;
891
892
fail:
@@ -975,12 +963,6 @@ int qcow2_snapshot_delete(BlockDriverState *bs,
963
return ret;
964
}
965
978
-#ifdef DEBUG_ALLOC
979
- {
980
- BdrvCheckResult result = {0};
981
- qcow2_check_refcounts(bs, &result, 0);
982
- }
983
-#endif
966
return 0;
967
}
968