aboutsummaryrefslogtreecommitdiff
path: root/block/blklogwrites.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 /block/blklogwrites.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 'block/blklogwrites.c')
-rw-r--r--block/blklogwrites.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blklogwrites.c b/block/blklogwrites.c
index 3678f6cf42..7207b2e757 100644
--- a/block/blklogwrites.c
+++ b/block/blklogwrites.c
@@ -251,9 +251,9 @@ static int blk_log_writes_open(BlockDriverState *bs, QDict *options, int flags,
ret = 0;
fail_log:
if (ret < 0) {
- bdrv_graph_wrlock(NULL);
+ bdrv_graph_wrlock();
bdrv_unref_child(bs, s->log_file);
- bdrv_graph_wrunlock(NULL);
+ bdrv_graph_wrunlock();
s->log_file = NULL;
}
fail:
@@ -265,10 +265,10 @@ static void blk_log_writes_close(BlockDriverState *bs)
{
BDRVBlkLogWritesState *s = bs->opaque;
- bdrv_graph_wrlock(NULL);
+ bdrv_graph_wrlock();
bdrv_unref_child(bs, s->log_file);
s->log_file = NULL;
- bdrv_graph_wrunlock(NULL);
+ bdrv_graph_wrunlock();
}
static int64_t coroutine_fn GRAPH_RDLOCK