open_failed:
bs->drv = NULL;
- bdrv_graph_wrlock(NULL);
+ bdrv_graph_wrlock();
if (bs->file != NULL) {
bdrv_unref_child(bs, bs->file);
assert(!bs->file);
}
- bdrv_graph_wrunlock(NULL);
+ bdrv_graph_wrunlock();
g_free(bs->opaque);
bs->opaque = NULL;
bdrv_ref(drain_bs);
bdrv_drained_begin(drain_bs);
- bdrv_graph_wrlock(backing_hd);
+ bdrv_graph_wrlock();
ret = bdrv_set_backing_hd_drained(bs, backing_hd, errp);
- bdrv_graph_wrunlock(backing_hd);
+ bdrv_graph_wrunlock();
bdrv_drained_end(drain_bs);
bdrv_unref(drain_bs);
return NULL;
}
- bdrv_graph_wrlock(NULL);
+ bdrv_graph_wrlock();
ctx = bdrv_get_aio_context(bs);
aio_context_acquire(ctx);
child = bdrv_attach_child(parent, bs, bdref_key, child_class, child_role,
errp);
aio_context_release(ctx);
- bdrv_graph_wrunlock(NULL);
+ bdrv_graph_wrunlock();
return child;
}
aio_context_release(ctx);
}
- bdrv_graph_wrlock(NULL);
+ bdrv_graph_wrlock();
tran_commit(tran);
- bdrv_graph_wrunlock(NULL);
+ bdrv_graph_wrunlock();
QTAILQ_FOREACH_REVERSE(bs_entry, bs_queue, entry) {
BlockDriverState *bs = bs_entry->state.bs;
goto cleanup;
abort:
- bdrv_graph_wrlock(NULL);
+ bdrv_graph_wrlock();
tran_abort(tran);
- bdrv_graph_wrunlock(NULL);
+ bdrv_graph_wrunlock();
QTAILQ_FOREACH_SAFE(bs_entry, bs_queue, entry, next) {
if (bs_entry->prepared) {
}
bdrv_graph_rdunlock_main_loop();
- bdrv_graph_wrlock(new_child_bs);
+ bdrv_graph_wrlock();
ret = bdrv_set_file_or_backing_noperm(bs, new_child_bs, is_backing,
tran, errp);
- bdrv_graph_wrunlock_ctx(ctx);
+ bdrv_graph_wrunlock();
if (old_ctx != ctx) {
aio_context_release(ctx);
bs->drv = NULL;
}
- bdrv_graph_wrlock(bs);
+ bdrv_graph_wrlock();
QLIST_FOREACH_SAFE(child, &bs->children, next, next) {
bdrv_unref_child(bs, child);
}
assert(!bs->backing);
assert(!bs->file);
- bdrv_graph_wrunlock(bs);
+ bdrv_graph_wrunlock();
g_free(bs->opaque);
bs->opaque = NULL;
bdrv_graph_rdunlock_main_loop();
bdrv_drained_begin(child_bs);
- bdrv_graph_wrlock(bs);
+ bdrv_graph_wrlock();
ret = bdrv_replace_node_common(bs, child_bs, true, true, errp);
- bdrv_graph_wrunlock(bs);
+ bdrv_graph_wrunlock();
bdrv_drained_end(child_bs);
return ret;
aio_context_acquire(old_context);
new_context = NULL;
- bdrv_graph_wrlock(bs_top);
+ bdrv_graph_wrlock();
child = bdrv_attach_child_noperm(bs_new, bs_top, "backing",
&child_of_bds, bdrv_backing_role(bs_new),
tran_finalize(tran, ret);
bdrv_refresh_limits(bs_top, NULL, NULL);
- bdrv_graph_wrunlock(bs_top);
+ bdrv_graph_wrunlock();
bdrv_drained_end(bs_top);
bdrv_drained_end(bs_new);
bdrv_ref(old_bs);
bdrv_drained_begin(old_bs);
bdrv_drained_begin(new_bs);
- bdrv_graph_wrlock(new_bs);
+ bdrv_graph_wrlock();
bdrv_replace_child_tran(child, new_bs, tran);
tran_finalize(tran, ret);
- bdrv_graph_wrunlock(new_bs);
+ bdrv_graph_wrunlock();
bdrv_drained_end(old_bs);
bdrv_drained_end(new_bs);
bdrv_unref(old_bs);
bdrv_ref(bs);
bdrv_drained_begin(bs);
bdrv_drained_begin(new_node_bs);
- bdrv_graph_wrlock(new_node_bs);
+ bdrv_graph_wrlock();
ret = bdrv_replace_node(bs, new_node_bs, errp);
- bdrv_graph_wrunlock(new_node_bs);
+ bdrv_graph_wrunlock();
bdrv_drained_end(new_node_bs);
bdrv_drained_end(bs);
bdrv_unref(bs);
bdrv_ref(top);
bdrv_drained_begin(base);
- bdrv_graph_wrlock(base);
+ bdrv_graph_wrlock();
if (!top->drv || !base->drv) {
goto exit_wrlock;
* That's a FIXME.
*/
bdrv_replace_node_common(top, base, false, false, &local_err);
- bdrv_graph_wrunlock(base);
+ bdrv_graph_wrunlock();
if (local_err) {
error_report_err(local_err);
goto exit;
exit_wrlock:
- bdrv_graph_wrunlock(base);
+ bdrv_graph_wrunlock();
exit:
bdrv_drained_end(base);
bdrv_unref(top);