diff mbox series

[-next] io_uring: Fix build error without CONFIG_EVENTFD

Message ID 20221122120243.76186-1-zhangqilong3@huawei.com (mailing list archive)
State New
Headers show
Series [-next] io_uring: Fix build error without CONFIG_EVENTFD | expand

Commit Message

Zhang Qilong Nov. 22, 2022, 12:02 p.m. UTC
If CONFIG_IO_URING=y, CONFIG_EVENTFD=n, bulding fails:

io_uring/io_uring.c: In function ‘io_eventfd_ops’:
io_uring/io_uring.c:498:3: error: implicit declaration of function ‘eventfd_signal_mask’; did you mean ‘eventfd_signal’? [-Werror=implicit-function-declaration]
   eventfd_signal_mask(ev_fd->cq_ev_fd, 1, EPOLL_URING_WAKE);

This patch fixes that.

Fixes: 261187e66de3 ("io_uring: pass in EPOLL_URING_WAKE for eventfd signaling and wakeups")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
 include/linux/eventfd.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Jens Axboe Nov. 22, 2022, 1:10 p.m. UTC | #1
On 11/22/22 5:02 AM, Zhang Qilong wrote:
> If CONFIG_IO_URING=y, CONFIG_EVENTFD=n, bulding fails:
> 
> io_uring/io_uring.c: In function ‘io_eventfd_ops’:
> io_uring/io_uring.c:498:3: error: implicit declaration of function ‘eventfd_signal_mask’; did you mean ‘eventfd_signal’? [-Werror=implicit-function-declaration]
>    eventfd_signal_mask(ev_fd->cq_ev_fd, 1, EPOLL_URING_WAKE);
> 
> This patch fixes that.

Thanks, folded in.
diff mbox series

Patch

diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h
index e849329ce1a8..6c541c9a2478 100644
--- a/include/linux/eventfd.h
+++ b/include/linux/eventfd.h
@@ -67,6 +67,12 @@  static inline int eventfd_signal(struct eventfd_ctx *ctx, int n)
 	return -ENOSYS;
 }
 
+static inline int eventfd_signal_mask(struct eventfd_ctx *ctx,
+				       __u64 n, unsigned mask)
+{
+	return -ENOSYS;
+}
+
 static inline void eventfd_ctx_put(struct eventfd_ctx *ctx)
 {