]> git.ipfire.org Git - thirdparty/linux.git/commit
eventpoll: relocate KCMP helpers near compat syscalls
authorChristian Brauner <brauner@kernel.org>
Fri, 24 Apr 2026 13:46:40 +0000 (15:46 +0200)
committerChristian Brauner <brauner@kernel.org>
Tue, 28 Apr 2026 15:27:28 +0000 (17:27 +0200)
commit7de03099264ac71d1fed8af9632bfea5af7bbf49
tree1530b2424b23ae4cc3597048f47d0fbc61de8ae3
parent6a3f1a494bc91d7976cf0d2b200bb3f1a22eef64
eventpoll: relocate KCMP helpers near compat syscalls

ep_find_tfd() and get_epoll_tfile_raw_ptr() are only used when
CONFIG_KCMP=y. They implement the lookup side of the kcmp(2)
KCMP_EPOLL_TFD query. The helpers currently live between ep_find()
and ep_poll_callback(), interrupting the run of hot-path code
(callback, wait-queue setup, path check, insert, modify, send_events,
poll) with a feature-gated block.

Move the #ifdef CONFIG_KCMP block next to #ifdef CONFIG_COMPAT, which
is also a peripheral ABI extension. Hot-path code becomes a
contiguous span, and the userspace-adjacent extensions cluster at the
end of the file just before eventpoll_init().

Pure code movement; diff is 44 removed and 44 added, all within one
block. No functional change.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Link: https://patch.msgid.link/20260424-work-epoll-rework-v1-9-249ed00a20f3@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/eventpoll.c