All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH V2] quorum: fix segfault when read fails in fifo mode
@ 2016-02-05  2:25 Changlong Xie
  2016-02-05 13:28 ` Alberto Garcia
  2016-02-05 15:46 ` Eric Blake
  0 siblings, 2 replies; 5+ messages in thread
From: Changlong Xie @ 2016-02-05  2:25 UTC (permalink / raw)
  To: qemu devel, Alberto Garcia, Kevin Wolf, Eric Blake; +Cc: Dr. David Alan Gilbert

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Changlong Xie <xiecl.fnst@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) {
+            acb->child_iter++;
             read_fifo_child(acb);
             return;
         }
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-15  5:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-05  2:25 [Qemu-devel] [PATCH V2] quorum: fix segfault when read fails in fifo mode Changlong Xie
2016-02-05 13:28 ` Alberto Garcia
2016-02-05 15:47   ` Kevin Wolf
2016-02-05 15:46 ` Eric Blake
2016-02-15  5:08   ` Changlong Xie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.