[PATCH 3/7] commit: Fix argument order for block_job_error_action()

Kevin Wolf posted 7 patches 5 years, 9 months ago
Maintainers: Markus Armbruster <armbru@redhat.com>, Eric Blake <eblake@redhat.com>, John Snow <jsnow@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
[PATCH 3/7] commit: Fix argument order for block_job_error_action()
Posted by Kevin Wolf 5 years, 9 months ago
The block_job_error_action() error call in the commit job gives the
on_err and is_read arguments in the wrong order. Fix this.

(Of course, hard-coded is_read = false is wrong, too, but that's a
separate problem for a separate patch.)

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/commit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/commit.c b/block/commit.c
index cce898a4f3..8189f079d2 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -182,7 +182,7 @@ static int coroutine_fn commit_run(Job *job, Error **errp)
         }
         if (ret < 0) {
             BlockErrorAction action =
-                block_job_error_action(&s->common, false, s->on_error, -ret);
+                block_job_error_action(&s->common, s->on_error, false, -ret);
             if (action == BLOCK_ERROR_ACTION_REPORT) {
                 goto out;
             } else {
-- 
2.20.1


Re: [PATCH 3/7] commit: Fix argument order for block_job_error_action()
Posted by Ján Tomko 5 years, 9 months ago
On Fri, Feb 14, 2020 at 09:08:08PM +0100, Kevin Wolf wrote:
>The block_job_error_action() error call in the commit job gives the
>on_err and is_read arguments in the wrong order. Fix this.
>
>(Of course, hard-coded is_read = false is wrong, too, but that's a
>separate problem for a separate patch.)
>
>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
>---
> block/commit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano