On 07/10/2017 03:35 AM, Denis V. Lunev wrote: > Signed-off-by: Denis V. Lunev <d...@openvz.org> > CC: Stefan Hajnoczi <stefa...@redhat.com> (supporter:Block I/O path) > CC: Fam Zheng <f...@redhat.com> (supporter:Block I/O path)
The commit message is a bit sparse; I might have written: block: fix shadowed variable in bdrv_co_pdiscard We've had a shadowed 'ret' variable, which risks returning the wrong value, introduced in commit b9c64947. > --- > block/io.c | 1 - > 1 file changed, 1 deletion(-) Adding qemu-stable in cc, and you can add: Reviewed-by: Eric Blake <ebl...@redhat.com> [and I wonder why gcc doesn't flag the shadowed variable for me - I definitely touched that code in commit 9f1963b3, but didn't notice that I kept the shadowing in place. I guess we don't have that compiler warning flag turned on for default configuration] > > 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) { > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature