Skip to content

Commit 11c5ad0

Browse files
bnoordhuisAl Viro
authored andcommitted
eventpoll: switch to ->poll_mask
Signed-off-by: Ben Noordhuis <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 2739b80 commit 11c5ad0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

fs/eventpoll.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -922,13 +922,17 @@ static __poll_t ep_read_events_proc(struct eventpoll *ep, struct list_head *head
922922
return 0;
923923
}
924924

925-
static __poll_t ep_eventpoll_poll(struct file *file, poll_table *wait)
925+
static struct wait_queue_head *ep_eventpoll_get_poll_head(struct file *file,
926+
__poll_t eventmask)
926927
{
927928
struct eventpoll *ep = file->private_data;
928-
int depth = 0;
929+
return &ep->poll_wait;
930+
}
929931

930-
/* Insert inside our poll wait queue */
931-
poll_wait(file, &ep->poll_wait, wait);
932+
static __poll_t ep_eventpoll_poll_mask(struct file *file, __poll_t eventmask)
933+
{
934+
struct eventpoll *ep = file->private_data;
935+
int depth = 0;
932936

933937
/*
934938
* Proceed to find out if wanted events are really available inside
@@ -968,7 +972,8 @@ static const struct file_operations eventpoll_fops = {
968972
.show_fdinfo = ep_show_fdinfo,
969973
#endif
970974
.release = ep_eventpoll_release,
971-
.poll = ep_eventpoll_poll,
975+
.get_poll_head = ep_eventpoll_get_poll_head,
976+
.poll_mask = ep_eventpoll_poll_mask,
972977
.llseek = noop_llseek,
973978
};
974979

0 commit comments

Comments
 (0)