aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2023-12-05 13:20:02 -0500
committerKevin Wolf <kwolf@redhat.com>2023-12-21 22:49:27 +0100
commit6bc30f19498547fac9cef98316a65cf6c1f14205 (patch)
tree56411ed59185cc60c896a63b4d58f56628821ffe /blockdev.c
parentb5f4fda4fb773257e142429e4fe78bbdea771075 (diff)
graph-lock: remove AioContext locking
Stop acquiring/releasing the AioContext lock in bdrv_graph_wrlock()/bdrv_graph_unlock() since the lock no longer has any effect. The distinction between bdrv_graph_wrunlock() and bdrv_graph_wrunlock_ctx() becomes meaningless and they can be collapsed into one function. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20231205182011.1976568-6-stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/blockdev.c b/blockdev.c
index c91f49e7b6..9e1381169d 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1611,9 +1611,9 @@ static void external_snapshot_abort(void *opaque)
}
bdrv_drained_begin(state->new_bs);
- bdrv_graph_wrlock(state->old_bs);
+ bdrv_graph_wrlock();
bdrv_replace_node(state->new_bs, state->old_bs, &error_abort);
- bdrv_graph_wrunlock(state->old_bs);
+ bdrv_graph_wrunlock();
bdrv_drained_end(state->new_bs);
bdrv_unref(state->old_bs); /* bdrv_replace_node() ref'ed old_bs */
@@ -3657,7 +3657,7 @@ void qmp_x_blockdev_change(const char *parent, const char *child,
BlockDriverState *parent_bs, *new_bs = NULL;
BdrvChild *p_child;
- bdrv_graph_wrlock(NULL);
+ bdrv_graph_wrlock();
parent_bs = bdrv_lookup_bs(parent, parent, errp);
if (!parent_bs) {
@@ -3693,7 +3693,7 @@ void qmp_x_blockdev_change(const char *parent, const char *child,
}
out:
- bdrv_graph_wrunlock(NULL);
+ bdrv_graph_wrunlock();
}
BlockJobInfoList *qmp_query_block_jobs(Error **errp)