diff options
Diffstat (limited to 'blockjob.c')
-rw-r--r-- | blockjob.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/blockjob.c b/blockjob.c index 7edc945119..e7d49b7169 100644 --- a/blockjob.c +++ b/blockjob.c @@ -45,6 +45,7 @@ void *block_job_create(const BlockJobType *job_type, BlockDriverState *bs, error_set(errp, QERR_DEVICE_IN_USE, bdrv_get_device_name(bs)); return NULL; } + bdrv_ref(bs); bdrv_set_in_use(bs, 1); job = g_malloc0(job_type->instance_size); |