diff options
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/blockdev.c b/blockdev.c index 03ddd3ac6e..442ca8d19d 100644 --- a/blockdev.c +++ b/blockdev.c @@ -4135,8 +4135,9 @@ BlockJobInfoList *qmp_query_block_jobs(Error **errp) { BlockJobInfoList *head = NULL, **p_next = &head; BlockDriverState *bs; + BdrvNextIterator *it = NULL; - for (bs = bdrv_next(NULL); bs; bs = bdrv_next(bs)) { + while ((it = bdrv_next(it, &bs))) { AioContext *aio_context = bdrv_get_aio_context(bs); aio_context_acquire(aio_context); |