diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2010-04-15 14:11:35 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-04-23 16:21:58 +0200 |
commit | d4c146f0da2ace38b1a0e9ba42374901198909cf (patch) | |
tree | 2cd4b155a41f1623b0f43ed1178231eaa285f2b5 /block/qcow2.c | |
parent | 2be5064953540d5451480375519389f104eb7909 (diff) |
qcow2: Use QLIST_FOREACH_SAFE macro
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 30ded6ae9b..f3e3cba71c 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); } |