aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2020-02-24 10:34:06 +0000
committerStefan Hajnoczi <stefanha@redhat.com>2020-03-09 16:39:20 +0000
commitc39cbedb54fc49ba41cfe0af36570818025d281e (patch)
treec349dfb4d4174d323fd5fffae246b92a79d7d3ba /util
parenta31ca6801c027dbee2c589da85814b56eec563f6 (diff)
downloadqemu-c39cbedb54fc49ba41cfe0af36570818025d281e.zip
qemu-c39cbedb54fc49ba41cfe0af36570818025d281e.tar.gz
qemu-c39cbedb54fc49ba41cfe0af36570818025d281e.tar.bz2
aio-posix: remove confusing QLIST_SAFE_REMOVE()
QLIST_SAFE_REMOVE() is confusing here because the node must be on the list. We actually just wanted to clear the linked list pointers when removing it from the list. QLIST_REMOVE() now does this, so switch to it. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Link: https://lore.kernel.org/r/20200224103406.1894923-3-stefanha@redhat.com Message-Id: <20200224103406.1894923-3-stefanha@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/aio-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/aio-posix.c b/util/aio-posix.c
index 9e1befc..b339aab 100644
--- a/util/aio-posix.c
+++ b/util/aio-posix.c
@@ -493,7 +493,7 @@ static bool aio_dispatch_ready_handlers(AioContext *ctx,
AioHandler *node;
while ((node = QLIST_FIRST(ready_list))) {
- QLIST_SAFE_REMOVE(node, node_ready);
+ QLIST_REMOVE(node, node_ready);
progress = aio_dispatch_handler(ctx, node) || progress;
}