aboutsummaryrefslogtreecommitdiff
path: root/block/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/stream.c')
-rw-r--r--block/stream.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/stream.c b/block/stream.c
index ab0bd057f7..ba535c5861 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -56,7 +56,7 @@ static void close_unused_images(BlockDriverState *top, BlockDriverState *base,
const char *base_id)
{
BlockDriverState *intermediate;
- intermediate = top->backing_hd;
+ intermediate = backing_bs(top);
/* Must assign before bdrv_delete() to prevent traversing dangling pointer
* while we delete backing image instances.
@@ -72,7 +72,7 @@ static void close_unused_images(BlockDriverState *top, BlockDriverState *base,
}
unused = intermediate;
- intermediate = intermediate->backing_hd;
+ intermediate = backing_bs(intermediate);
bdrv_set_backing_hd(unused, NULL);
bdrv_unref(unused);
}
@@ -121,7 +121,7 @@ static void coroutine_fn stream_run(void *opaque)
int n = 0;
void *buf;
- if (!bs->backing_hd) {
+ if (!bs->backing) {
block_job_completed(&s->common, 0);
return;
}
@@ -166,7 +166,7 @@ wait:
} else if (ret >= 0) {
/* Copy if allocated in the intermediate images. Limit to the
* known-unallocated area [sector_num, sector_num+n). */
- ret = bdrv_is_allocated_above(bs->backing_hd, base,
+ ret = bdrv_is_allocated_above(backing_bs(bs), base,
sector_num, n, &n);
/* Finish early if end of backing file has been reached */