On Fri, Nov 06, 2015 at 09:04:57AM +0800, arei.gong...@huawei.com wrote: > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > index 093e475..752586d 100644 > --- a/hw/block/virtio-blk.c > +++ b/hw/block/virtio-blk.c > @@ -409,18 +409,20 @@ void virtio_blk_submit_multireq(BlockBackend *blk, > MultiReqBuffer *mrb) > /* merge would exceed maximum number of IOVs */ > if (niov + req->qiov.niov > IOV_MAX) { > merge = false; > + goto unmerge; > } > > /* merge would exceed maximum transfer length of backend device > */ > if (req->qiov.size / BDRV_SECTOR_SIZE + nb_sectors > > max_xfer_len) { > merge = false; > + goto unmerge; > } > > /* requests are not sequential */ > if (sector_num + nb_sectors != req->sector_num) { > merge = false; > } > - > +unmerge:
C has a way of expressing this without gotos. Please use else if: if (a) { ... } else if (b) { ... } else if (c) { ... }
signature.asc
Description: PGP signature