Every entry sleeps its pollers on the wait queue procfs owns for it now, so take the poll_table away from the method. An entry can't hand procfs a queue of its own anymore then, which is what went wrong for sunrpc, and the method only reports the mask.
Signed-off-by: Christian Brauner (Amutable) <[email protected]> --- arch/powerpc/kernel/rtasd.c | 2 +- drivers/input/input.c | 2 +- drivers/md/md.c | 2 +- fs/proc/inode.c | 2 +- include/linux/proc_fs.h | 9 +++++---- kernel/sched/psi.c | 4 ++-- mm/swapfile.c | 2 +- net/sunrpc/cache.c | 2 +- sound/core/info.c | 2 +- 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index 49036790b67c..34705234db57 100644 --- a/arch/powerpc/kernel/rtasd.c +++ b/arch/powerpc/kernel/rtasd.c @@ -343,7 +343,7 @@ static ssize_t rtas_log_read(struct file * file, char * buf, return error; } -static __poll_t rtas_log_poll(struct file *file, poll_table * wait) +static __poll_t rtas_log_poll(struct file *file) { if (rtas_log_size) return EPOLLIN | EPOLLRDNORM; diff --git a/drivers/input/input.c b/drivers/input/input.c index a984810eb80d..5a0547296c6c 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1097,7 +1097,7 @@ struct input_seq_state { int input_devices_state; }; -static __poll_t input_proc_devices_poll(struct file *file, poll_table *wait) +static __poll_t input_proc_devices_poll(struct file *file) { struct seq_file *seq = file->private_data; struct input_seq_state *state = seq->private; diff --git a/drivers/md/md.c b/drivers/md/md.c index 7560dcf0f5c8..94926a7c3d6f 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -9176,7 +9176,7 @@ static int md_seq_open(struct inode *inode, struct file *file) return 0; } -static __poll_t mdstat_poll(struct file *filp, poll_table *wait) +static __poll_t mdstat_poll(struct file *filp) { struct seq_file *seq = filp->private_data; __poll_t mask; diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 7f6c63885f53..c35e13b44eed 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -546,7 +546,7 @@ static __poll_t proc_reg_poll(struct file *file, struct poll_table_struct *pts) poll_wait(file, &pde->open->poll, pts); if (!pde_pin(pde)) return DEFAULT_POLLMASK | EPOLLERR | EPOLLPRI; - rv = pde->proc_ops->proc_poll(file, pts); + rv = pde->proc_ops->proc_poll(file); pde_unpin(pde); return rv; } diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 872f3bd54c11..6e2bcdf3c1b5 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -84,11 +84,12 @@ struct proc_ops { int (*proc_release)(struct inode *, struct file *); /* * procfs owns a wait queue for an entry with a ->proc_poll() and - * does the poll_wait() on it before it calls the method. The owner - * wakes the pollers with proc_poll_notify(). A poll on a removed - * entry reports EPOLLERR | EPOLLPRI. + * does the poll_wait() on it before it calls the method, which only + * reports the mask. The owner wakes the pollers with + * proc_poll_notify(). A poll on a removed entry reports + * EPOLLERR | EPOLLPRI. */ - __poll_t (*proc_poll)(struct file *, struct poll_table_struct *); + __poll_t (*proc_poll)(struct file *); /* * procfs pins the entry around ->proc_mmap() and wraps the * vm_operations of the mapping so that ->open(), ->fault(), diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index 9362c27d47ab..ecb9028b5c49 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -1606,11 +1606,11 @@ static ssize_t psi_cpu_write(struct file *file, char *buf, size_t nbytes, return psi_write(file, buf, nbytes, PSI_CPU); } -static __poll_t psi_fop_poll(struct file *file, poll_table *wait) +static __poll_t psi_fop_poll(struct file *file) { struct seq_file *seq = file->private_data; - return psi_trigger_poll(&seq->private, wait); + return psi_trigger_poll(&seq->private, NULL); } static int psi_fop_release(struct inode *inode, struct file *file) diff --git a/mm/swapfile.c b/mm/swapfile.c index 1d063a1cef43..e7c019871e35 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -3315,7 +3315,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile) } #ifdef CONFIG_PROC_FS -static __poll_t swaps_poll(struct file *file, poll_table *wait) +static __poll_t swaps_poll(struct file *file) { struct seq_file *seq = file->private_data; diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index b8f70d8c3b0c..4854a42d43a2 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1588,7 +1588,7 @@ static ssize_t cache_write_procfs(struct file *filp, char *buf, size_t count, return ret ? ret : count; } -static __poll_t cache_poll_procfs(struct file *filp, poll_table *wait) +static __poll_t cache_poll_procfs(struct file *filp) { struct cache_detail *cd = pde_data(file_inode(filp)); diff --git a/sound/core/info.c b/sound/core/info.c index 3439ae341e26..8e64d8e3e5b2 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -184,7 +184,7 @@ static ssize_t snd_info_entry_write(struct file *file, char *buffer, return size; } -static __poll_t snd_info_entry_poll(struct file *file, poll_table *wait) +static __poll_t snd_info_entry_poll(struct file *file) { struct snd_info_private_data *data = file->private_data; struct snd_info_entry *entry = data->entry; -- 2.53.0
