]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
block/commit: mark commit_abort() as GRAPH_UNLOCKED
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 30 May 2025 15:11:17 +0000 (17:11 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 14 Jul 2025 13:42:13 +0000 (15:42 +0200)
The function commit_abort() calls bdrv_drained_begin(), which must be
called with the graph unlocked.

Also mark the JobDriver's abort() callback as GRAPH_UNLOCKED_PTR,
because that is the callback via which commit_abort() is reached.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20250530151125.955508-41-f.ebner@proxmox.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/commit.c
include/qemu/job.h

index 7496cf732e88a24d6422f3b1ee54c5b4ad6d061e..0d9e1a16d7a806c2c4d780c4423452d8f367f95b 100644 (file)
@@ -68,7 +68,7 @@ static int commit_prepare(Job *job)
                                   s->backing_mask_protocol);
 }
 
-static void commit_abort(Job *job)
+static void GRAPH_UNLOCKED commit_abort(Job *job)
 {
     CommitBlockJob *s = container_of(job, CommitBlockJob, common.job);
     BlockDriverState *top_bs = blk_bs(s->top);
index bb8ee766efd32167dc698759e3aebb2593b3a376..ead31578d3d599cdbebad0c456cfc6d600516c9b 100644 (file)
@@ -283,7 +283,7 @@ struct JobDriver {
      * All jobs will complete with a call to either .commit() or .abort() but
      * never both.
      */
-    void (*abort)(Job *job);
+    void GRAPH_UNLOCKED_PTR (*abort)(Job *job);
 
     /**
      * If the callback is not NULL, it will be invoked after a call to either