2
0
mirror of git://github.com/lxc/lxc synced 2025-09-01 15:10:25 +00:00

mainloop: minor fixes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner
2021-08-10 17:42:41 +02:00
parent a399d7ead0
commit 80aa5876b3

View File

@@ -51,7 +51,7 @@ static void delete_handler(struct lxc_async_descr *descr,
* generated before and since this is a oneshot handler it * generated before and since this is a oneshot handler it
* means that it has been deactivated. So the only thing we * means that it has been deactivated. So the only thing we
* need to do is to call the registered cleanup handler and * need to do is to call the registered cleanup handler and
* remove the handlerfrom the list. * remove the handler from the list.
*/ */
if (!oneshot) if (!oneshot)
ret = __io_uring_disarm(descr, handler); ret = __io_uring_disarm(descr, handler);
@@ -376,8 +376,8 @@ static int __lxc_mainloop_add_handler_events(struct lxc_async_descr *descr,
if (descr->type == LXC_MAINLOOP_IO_URING) { if (descr->type == LXC_MAINLOOP_IO_URING) {
ret = __io_uring_arm(descr, handler, oneshot); ret = __io_uring_arm(descr, handler, oneshot);
} else { } else {
ev.events = events; ev.events = events;
ev.data.ptr = handler; ev.data.ptr = handler;
ret = epoll_ctl(descr->epfd, EPOLL_CTL_ADD, fd, &ev); ret = epoll_ctl(descr->epfd, EPOLL_CTL_ADD, fd, &ev);
} }
if (ret < 0) if (ret < 0)