From: Jens Axboe Date: Thu, 14 May 2026 14:07:18 +0000 (-0600) Subject: eventpoll: export is_file_epoll() X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=5de2759f2b7c925f187e552cae47775acd5f4b40;p=thirdparty%2Flinux.git eventpoll: export is_file_epoll() Make is_file_epoll() available outside of epoll. This is in preparation from using it from io_uring. Signed-off-by: Jens Axboe Link: https://patch.msgid.link/20260514140817.623026-3-axboe@kernel.dk Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner --- diff --git a/fs/eventpoll.c b/fs/eventpoll.c index f464f2f39e0e8..9ea6a2bd3d872 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -334,7 +334,7 @@ static void __init epoll_sysctls_init(void) static const struct file_operations eventpoll_fops; -static inline int is_file_epoll(struct file *f) +int is_file_epoll(struct file *f) { return f->f_op == &eventpoll_fops; } diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index 728fb5dee5ede..7bf30e9f90d7b 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h @@ -63,6 +63,7 @@ static inline void eventpoll_release(struct file *file) int do_epoll_ctl(int epfd, int op, int fd, struct epoll_event *epds, bool nonblock); +int is_file_epoll(struct file *f); /* Tells if the epoll_ctl(2) operation needs an event copy from userspace */ static inline int ep_op_has_event(int op)