fork: fix pidfd_poll()'s return type
[sfrench/cifs-2.6.git] / kernel / fork.c
index 55af6931c6ec3f8b817836c7fc78d56638f7de8c..13b38794efb56940c18592d0ef26904d5cacb100 100644 (file)
@@ -1708,11 +1708,11 @@ static void pidfd_show_fdinfo(struct seq_file *m, struct file *f)
 /*
  * Poll support for process exit notification.
  */
-static unsigned int pidfd_poll(struct file *file, struct poll_table_struct *pts)
+static __poll_t pidfd_poll(struct file *file, struct poll_table_struct *pts)
 {
        struct task_struct *task;
        struct pid *pid = file->private_data;
-       int poll_flags = 0;
+       __poll_t poll_flags = 0;
 
        poll_wait(file, &pid->wait_pidfd, pts);
 
@@ -1724,7 +1724,7 @@ static unsigned int pidfd_poll(struct file *file, struct poll_table_struct *pts)
         * group, then poll(2) should block, similar to the wait(2) family.
         */
        if (!task || (task->exit_state && thread_group_empty(task)))
-               poll_flags = POLLIN | POLLRDNORM;
+               poll_flags = EPOLLIN | EPOLLRDNORM;
        rcu_read_unlock();
 
        return poll_flags;