]> git.proxmox.com Git - mirror_qemu.git/commitdiff
aio-posix: Improve comment around marking node deleted
authorFam Zheng <famz@redhat.com>
Fri, 3 Aug 2018 06:39:17 +0000 (14:39 +0800)
committerFam Zheng <famz@redhat.com>
Wed, 15 Aug 2018 02:12:35 +0000 (10:12 +0800)
The counter is for qemu_lockcnt_inc/dec sections (read side),
qemu_lockcnt_lock/unlock is for the write side.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20180803063917.30292-1-famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
util/aio-posix.c

index b5c609b68b599f12c2c8bfef124fad3d511a93ff..131ba6b4a81b1b1617a3a6825f110991eab736c1 100644 (file)
@@ -232,7 +232,7 @@ void aio_set_fd_handler(AioContext *ctx,
             g_source_remove_poll(&ctx->source, &node->pfd);
         }
 
-        /* If the lock is held, just mark the node as deleted */
+        /* If a read is in progress, just mark the node as deleted */
         if (qemu_lockcnt_count(&ctx->list_lock)) {
             node->deleted = 1;
             node->pfd.revents = 0;