diff options
author | Hanna Reitz <hreitz@redhat.com> | 2022-03-04 16:37:26 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2022-03-04 18:18:26 +0100 |
commit | b8ba60067bf9df0f2e799b34eb00809f5d1e5989 (patch) | |
tree | 547317052938b90ac3c19d6f3b73b84fbee8efc6 /block | |
parent | 9086c7639822b6e96aa93192917bf036e1345b1d (diff) |
block/amend: Always call .bdrv_amend_clean()
.bdrv_amend_clean() says block drivers can use it to clean up what was
done in .bdrv_amend_pre_run(). Therefore, it should always be called
after .bdrv_amend_pre_run(), which means we need it to call it in the
JobDriver.free() callback, not in JobDriver.clean().
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220304153729.711387-3-hreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/amend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/amend.c b/block/amend.c index f465738665..553890ded9 100644 --- a/block/amend.c +++ b/block/amend.c @@ -62,7 +62,7 @@ static int blockdev_amend_pre_run(BlockdevAmendJob *s, Error **errp) return 0; } -static void blockdev_amend_clean(Job *job) +static void blockdev_amend_free(Job *job) { BlockdevAmendJob *s = container_of(job, BlockdevAmendJob, common); @@ -75,7 +75,7 @@ static const JobDriver blockdev_amend_job_driver = { .instance_size = sizeof(BlockdevAmendJob), .job_type = JOB_TYPE_AMEND, .run = blockdev_amend_run, - .clean = blockdev_amend_clean, + .free = blockdev_amend_free, }; void qmp_x_blockdev_amend(const char *job_id, |