aboutsummaryrefslogtreecommitdiff
path: root/util/aio-posix.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2020-03-05 17:08:03 +0000
committerStefan Hajnoczi <stefanha@redhat.com>2020-03-09 16:41:31 +0000
commitb321051cf48ccc2d3d832af111d688f2282f089b (patch)
tree32317a09036588fd33643a5e844da001b4bf5ddd /util/aio-posix.c
parent1f050a4690f62a1e7dabc4f44141e9f762c3769f (diff)
aio-posix: simplify FDMonOps->update() prototype
The AioHandler *node, bool is_new arguments are more complicated to think about than simply being given AioHandler *old_node, AioHandler *new_node. Furthermore, the new Linux io_uring file descriptor monitoring mechanism added by the new patch requires access to both the old and the new nodes. Make this change now in preparation. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Link: https://lore.kernel.org/r/20200305170806.1313245-5-stefanha@redhat.com Message-Id: <20200305170806.1313245-5-stefanha@redhat.com>
Diffstat (limited to 'util/aio-posix.c')
-rw-r--r--util/aio-posix.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/util/aio-posix.c b/util/aio-posix.c
index bc0b86547c..028b2abded 100644
--- a/util/aio-posix.c
+++ b/util/aio-posix.c
@@ -139,12 +139,7 @@ void aio_set_fd_handler(AioContext *ctx,
atomic_set(&ctx->poll_disable_cnt,
atomic_read(&ctx->poll_disable_cnt) + poll_disable_change);
- if (new_node) {
- ctx->fdmon_ops->update(ctx, new_node, is_new);
- } else if (node) {
- /* Unregister deleted fd_handler */
- ctx->fdmon_ops->update(ctx, node, false);
- }
+ ctx->fdmon_ops->update(ctx, node, new_node);
qemu_lockcnt_unlock(&ctx->list_lock);
aio_notify(ctx);