Re: [PATCH vfs/for-next 1/3] pipe: Move pipe wakeup helpers out of splice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/22/25 2:35 PM, Joe Damato wrote:
> Splice code has helpers to wakeup pipe readers and writers. Move these
> helpers out of splice, rename them from "wakeup_pipe_*" to
> "pipe_wakeup_*" and update call sites in splice.

This looks good to me, as it's moving the code to where it belongs.
One minor note:

> +void pipe_wakeup_readers(struct pipe_inode_info *pipe)
> +{
> +	smp_mb();
> +	if (waitqueue_active(&pipe->rd_wait))
> +		wake_up_interruptible(&pipe->rd_wait);
> +	kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
> +}
> +
> +void pipe_wakeup_writers(struct pipe_inode_info *pipe)
> +{
> +	smp_mb();
> +	if (waitqueue_active(&pipe->wr_wait))
> +		wake_up_interruptible(&pipe->wr_wait);
> +	kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
> +}

Both of these really should use wq_has_sleeper() - not related to your
change, as it makes more sense to keep the code while moving it. But
just spotted it while looking at it, just a note for the future... In
any case:

Reviewed-by: Jens Axboe <axboe@xxxxxxxxx>

-- 
Jens Axboe




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux