Lines Matching refs:poll
305 struct io_poll_iocb poll; member
1685 struct io_poll_iocb *poll = &req->poll; in io_poll_remove_one() local
1687 spin_lock(&poll->head->lock); in io_poll_remove_one()
1688 WRITE_ONCE(poll->canceled, true); in io_poll_remove_one()
1689 if (!list_empty(&poll->wait.entry)) { in io_poll_remove_one()
1690 list_del_init(&poll->wait.entry); in io_poll_remove_one()
1693 spin_unlock(&poll->head->lock); in io_poll_remove_one()
1744 req->poll.done = true; in io_poll_complete()
1752 struct io_poll_iocb *poll = &req->poll; in io_poll_complete_work() local
1753 struct poll_table_struct pt = { ._key = poll->events }; in io_poll_complete_work()
1757 if (!READ_ONCE(poll->canceled)) in io_poll_complete_work()
1758 mask = vfs_poll(poll->file, &pt) & poll->events; in io_poll_complete_work()
1768 if (!mask && !READ_ONCE(poll->canceled)) { in io_poll_complete_work()
1769 add_wait_queue(poll->head, &poll->wait); in io_poll_complete_work()
1784 struct io_poll_iocb *poll = container_of(wait, struct io_poll_iocb, in io_poll_wake() local
1786 struct io_kiocb *req = container_of(poll, struct io_kiocb, poll); in io_poll_wake()
1792 if (mask && !(mask & poll->events)) in io_poll_wake()
1795 list_del_init(&poll->wait.entry); in io_poll_wake()
1822 if (unlikely(pt->req->poll.head)) { in io_poll_queue_proc()
1828 pt->req->poll.head = head; in io_poll_queue_proc()
1829 add_wait_queue(head, &pt->req->poll.wait); in io_poll_queue_proc()
1834 struct io_poll_iocb *poll = &req->poll; in io_poll_add() local
1845 if (!poll->file) in io_poll_add()
1851 poll->events = demangle_poll(events) | EPOLLERR | EPOLLHUP; in io_poll_add()
1853 poll->head = NULL; in io_poll_add()
1854 poll->done = false; in io_poll_add()
1855 poll->canceled = false; in io_poll_add()
1858 ipt.pt._key = poll->events; in io_poll_add()
1863 INIT_LIST_HEAD(&poll->wait.entry); in io_poll_add()
1864 init_waitqueue_func_entry(&poll->wait, io_poll_wake); in io_poll_add()
1868 mask = vfs_poll(poll->file, &ipt.pt) & poll->events; in io_poll_add()
1871 if (likely(poll->head)) { in io_poll_add()
1872 spin_lock(&poll->head->lock); in io_poll_add()
1873 if (unlikely(list_empty(&poll->wait.entry))) { in io_poll_add()
1880 list_del_init(&poll->wait.entry); in io_poll_add()
1882 WRITE_ONCE(poll->canceled, true); in io_poll_add()
1883 else if (!poll->done) /* actually waiting for an event */ in io_poll_add()
1885 spin_unlock(&poll->head->lock); in io_poll_add()
3714 .poll = io_uring_poll,