On 02/04/2016 07:25 PM, Changlong Xie wrote: > Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> > Signed-off-by: Changlong Xie <xiecl.f...@cn.fujitsu.com> > --- > block/quorum.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/block/quorum.c b/block/quorum.c > index a5ae4b8..11cc60b 100644 > --- a/block/quorum.c > +++ b/block/quorum.c > @@ -286,7 +286,8 @@ static void quorum_aio_cb(void *opaque, int ret) > > if (acb->is_read && s->read_pattern == QUORUM_READ_PATTERN_FIFO) { > /* We try to read next child in FIFO order if we fail to read */ > - if (ret < 0 && ++acb->child_iter < s->num_children) { > + if (ret < 0 && (acb->child_iter + 1) < s->num_children) {
Could shorten this as if (ret < 0 && acb->child_iter <= s->num_children) { but I'm not sure it's worth the mental gymnastics. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature