qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qcow2: Use QLIST_FOREACH_SAFE macro
@ 2010-04-15 13:11 Stefan Hajnoczi
  2010-04-15 13:30 ` [Qemu-devel] " Kevin Wolf
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hajnoczi @ 2010-04-15 13:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 block/qcow2.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/block/qcow2.c b/block/qcow2.c
index 11ce8d1..9b986ae 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -539,14 +539,8 @@ static void run_dependent_requests(QCowL2Meta *m)
         QLIST_REMOVE(m, next_in_flight);
     }
 
-    /*
-     * Restart all dependent requests.
-     * Can't use QLIST_FOREACH here - the next link might not be the same
-     * any more after the callback  (request could depend on a different
-     * request now)
-     */
-    for (req = m->dependent_requests.lh_first; req != NULL; req = next) {
-        next = req->next_depend.le_next;
+    /* Restart all dependent requests */
+    QLIST_FOREACH_SAFE(req, &m->dependent_requests, next_depend, next) {
         qcow_aio_write_cb(req, 0);
     }
 
-- 
1.7.0

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

end of thread, other threads:[~2010-04-15 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-15 13:11 [Qemu-devel] [PATCH] qcow2: Use QLIST_FOREACH_SAFE macro Stefan Hajnoczi
2010-04-15 13:30 ` [Qemu-devel] " Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).