]> git.proxmox.com Git - mirror_qemu.git/blobdiff - aio.c
AIO deletion race fix
[mirror_qemu.git] / aio.c
diff --git a/aio.c b/aio.c
index 200320c979425bb25b8a3f0cc4aa6c33299f0ad3..11fbb6c0c536a254485c783137254645b9a0edc8 100644 (file)
--- a/aio.c
+++ b/aio.c
@@ -44,7 +44,8 @@ static AioHandler *find_aio_handler(int fd)
 
     LIST_FOREACH(node, &aio_handlers, node) {
         if (node->fd == fd)
-            return node;
+            if (!node->deleted)
+                return node;
     }
 
     return NULL;