Skip to content

io_uring related epoll cleanups#1311

Open
vfsci-bot[bot] wants to merge 5 commits intovfs.base.cifrom
pw/1088906/vfs.base.ci
Open

io_uring related epoll cleanups#1311
vfsci-bot[bot] wants to merge 5 commits intovfs.base.cifrom
pw/1088906/vfs.base.ci

Conversation

@vfsci-bot
Copy link
Copy Markdown

@vfsci-bot vfsci-bot Bot commented May 3, 2026

Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1088906
Submitter: Jens Axboe
Version: 1
Patches: 5/5
Message-ID: <[email protected]>
Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/[email protected]


Automated by ml2pr

axboe added 5 commits May 3, 2026 09:22
Have ep_find() and ep_insert() take a struct epoll_filefd rather
than a file/fd tuple. Kill off ep_set_ffd() as it's now no longer
needed.

No functional change. This is a prep patch for adding a file based
do_epoll_ctl() variant.

Signed-off-by: Jens Axboe <[email protected]>
Make is_file_epoll() available outside of epoll. This is in preparation
from using it from io_uring.

Signed-off-by: Jens Axboe <[email protected]>
Add do_epoll_ctl_file(), which takes a pre-resolved epoll file and a
struct epoll_filefd for the target rather than two integer file
descriptors. do_epoll_ctl() remains as a thin wrapper.

In preparation for using the file based interface from io_uring.

Signed-off-by: Jens Axboe <[email protected]>
No functional changes in this patch.

Signed-off-by: Jens Axboe <[email protected]>
One of the nastier things about epoll is how it allows adding epoll
files to epoll contexts. This leads to all sorts of loop detection
code, and has been a source of issues in the past.

Arguably adding IORING_EPOLL_CTL is a historical mistake on the
io_uring side, but we're kind of stuck with it now as it does seem
to be in use according to code searches. But we can at least minimize
the damage a bit and just disallow this part of epoll, where nesting
issues can arise.

Suggested-by: Linus Torvalds <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant