summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2026-05-14 08:07:18 -0600
committerChristian Brauner <brauner@kernel.org>2026-05-15 17:34:26 +0200
commit5de2759f2b7c925f187e552cae47775acd5f4b40 (patch)
treea65b6c10e8ad20a106ef82455cdba2e65a76ba35
parent9caef5b2a1fc22c2e24159a3d0fd74a47aed94ab (diff)
downloadlinux-5de2759f2b7c925f187e552cae47775acd5f4b40.tar.gz
linux-5de2759f2b7c925f187e552cae47775acd5f4b40.zip
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 <axboe@kernel.dk> Link: https://patch.msgid.link/20260514140817.623026-3-axboe@kernel.dk Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r--fs/eventpoll.c2
-rw-r--r--include/linux/eventpoll.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index f464f2f39e0e..9ea6a2bd3d87 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 728fb5dee5ed..7bf30e9f90d7 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)