Re: [PATCH] splice: pass a poll key when waking pipe readers and writers
From: Oleg Nesterov
Date: Wed Sep 16 2026 - 07:31:16 EST
On 09/16, Breno Leitao wrote:
>
> --- a/fs/splice.c
> +++ b/fs/splice.c
> @@ -179,7 +179,8 @@ static void wakeup_pipe_readers(struct pipe_inode_info *pipe)
> {
> smp_mb();
> if (waitqueue_active(&pipe->rd_wait))
> - wake_up_interruptible(&pipe->rd_wait);
> + wake_up_interruptible_poll(&pipe->rd_wait,
> + EPOLLIN | EPOLLRDNORM);
> kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
> }
>
> @@ -415,7 +416,8 @@ static void wakeup_pipe_writers(struct pipe_inode_info *pipe)
> {
> smp_mb();
> if (waitqueue_active(&pipe->wr_wait))
> - wake_up_interruptible(&pipe->wr_wait);
> + wake_up_interruptible_poll(&pipe->wr_wait,
> + EPOLLOUT | EPOLLWRNORM);
> kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
> }
Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>
While at it... I think they both should use wq_has_sleeper().
If you agree, feel free to send V2 with this additional change.
Or I will send this trivial cleanup on top of your patch.
Oleg.