Commit 96a07d5b authored by Andrey Shinkevich's avatar Andrey Shinkevich Committed by Max Reitz
Browse files

block/stream: refactor stream_run: drop goto



The goto is unnecessary in the stream_run() since the common exit
code was removed in the commit eb23654d:
"jobs: utilize job_exit shim".

Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: default avatarAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: default avatarAlberto Garcia <berto@igalia.com>
Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
Message-id: 1559152576-281803-3-git-send-email-andrey.shinkevich@virtuozzo.com
Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
parent 170d3bd3
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -120,13 +120,12 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
    void *buf;

    if (!bs->backing) {
        goto out;
        return 0;
    }

    len = bdrv_getlength(bs);
    if (len < 0) {
        ret = len;
        goto out;
        return len;
    }
    job_progress_set_remaining(&s->common.job, len);

@@ -203,14 +202,10 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
        bdrv_disable_copy_on_read(bs);
    }

    /* Do not remove the backing file if an error was there but ignored.  */
    ret = error;

    qemu_vfree(buf);

out:
    /* Modify backing chain and close BDSes in main loop */
    return ret;
    /* Do not remove the backing file if an error was there but ignored. */
    return error;
}

static const BlockJobDriver stream_job_driver = {