[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 25/26] qcow2: Use QLIST_FOREACH_SAFE macro
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 25/26] qcow2: Use QLIST_FOREACH_SAFE macro |
Date: |
Fri, 23 Apr 2010 17:30:57 +0200 |
From: Stefan Hajnoczi <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 30ded6a..f3e3cba 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.6.6.1
- [Qemu-devel] [PATCH 14/26] qcow2: Return 0/-errno in write_l1_entry, (continued)
- [Qemu-devel] [PATCH 14/26] qcow2: Return 0/-errno in write_l1_entry, Kevin Wolf, 2010/04/23
- [Qemu-devel] [PATCH 17/26] block: Do not export bdrv_first, Kevin Wolf, 2010/04/23
- [Qemu-devel] [PATCH 16/26] cleanup block driver option handling in vl.c, Kevin Wolf, 2010/04/23
- [Qemu-devel] [PATCH 18/26] block: Convert bdrv_first to QTAILQ, Kevin Wolf, 2010/04/23
- [Qemu-devel] [PATCH 21/26] block: Convert first_drv to QLIST, Kevin Wolf, 2010/04/23
- [Qemu-devel] [PATCH 19/26] Remove un-needed code, Kevin Wolf, 2010/04/23
- [Qemu-devel] [PATCH 20/26] block.h: bdrv_create2 doesn't exist any more, Kevin Wolf, 2010/04/23
- [Qemu-devel] [PATCH 22/26] qemu-img: Eliminate bdrv_new_open() code duplication, Kevin Wolf, 2010/04/23
- [Qemu-devel] [PATCH 23/26] qemu-img: Fix BRDV_O_FLAGS typo, Kevin Wolf, 2010/04/23
- [Qemu-devel] [PATCH 24/26] linux-aio: Fix typo in read() EINTR check, Kevin Wolf, 2010/04/23
- [Qemu-devel] [PATCH 25/26] qcow2: Use QLIST_FOREACH_SAFE macro,
Kevin Wolf <=
- [Qemu-devel] [PATCH 26/26] block: Free iovec arrays allocated by multiwrite_merge(), Kevin Wolf, 2010/04/23
- [Qemu-devel] Re: [PULL 00/26] Block patches, Anthony Liguori, 2010/04/23