[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH 1/1] block: fix possible return cod
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH 1/1] block: fix possible return code clobbering in bdrv_co_pdiscard |
Date: |
Mon, 10 Jul 2017 15:59:02 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 10.07.2017 um 10:35 hat Denis V. Lunev geschrieben:
> Signed-off-by: Denis V. Lunev <address@hidden>
> CC: Stefan Hajnoczi <address@hidden> (supporter:Block I/O path)
> CC: Fam Zheng <address@hidden> (supporter:Block I/O path)
> ---
> block/io.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/block/io.c b/block/io.c
> index ed31810c0a..e5c6dc77d3 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -2464,7 +2464,6 @@ int coroutine_fn bdrv_co_pdiscard(BlockDriverState *bs,
> int64_t offset,
> assert(max_pdiscard >= bs->bl.request_alignment);
>
> while (count > 0) {
> - int ret;
> int num = count;
>
> if (head) {
Good catch, and the fix looks fine.
This needs rebasing, though (conflicts with commit f5a5ca7 'block:
change variable names in BlockDriverState').
Kevin