@@ -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;
@@ -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;
@@ -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;
@@ -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;
}
@@ -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(),
@@ -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)
@@ -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;
@@ -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));
@@ -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;
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) <brauner@kernel.org> --- 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(-)