+13
-11
fs/eventpoll.c
+13
-11
fs/eventpoll.c
···
661
661
*
662
662
* Returns: The same integer error code returned by the @sproc callback.
663
663
*/
664
-
static int ep_scan_ready_list(struct eventpoll *ep,
665
-
int (*sproc)(struct eventpoll *,
664
+
static __poll_t ep_scan_ready_list(struct eventpoll *ep,
665
+
__poll_t (*sproc)(struct eventpoll *,
666
666
struct list_head *, void *),
667
667
void *priv, int depth, bool ep_locked)
668
668
{
669
-
int error, pwake = 0;
669
+
__poll_t res;
670
+
int pwake = 0;
670
671
unsigned long flags;
671
672
struct epitem *epi, *nepi;
672
673
LIST_HEAD(txlist);
···
696
695
/*
697
696
* Now call the callback function.
698
697
*/
699
-
error = (*sproc)(ep, &txlist, priv);
698
+
res = (*sproc)(ep, &txlist, priv);
700
699
701
700
spin_lock_irqsave(&ep->lock, flags);
702
701
/*
···
749
748
if (pwake)
750
749
ep_poll_safewake(&ep->poll_wait);
751
750
752
-
return error;
751
+
return res;
753
752
}
754
753
755
754
static void epi_rcu_free(struct rcu_head *head)
···
866
865
return 0;
867
866
}
868
867
869
-
static int ep_read_events_proc(struct eventpoll *ep, struct list_head *head,
868
+
static __poll_t ep_read_events_proc(struct eventpoll *ep, struct list_head *head,
870
869
void *priv);
871
870
static void ep_ptable_queue_proc(struct file *file, wait_queue_head_t *whead,
872
871
poll_table *pt);
···
876
875
* the ep->mtx so we need to start from depth=1, such that mutex_lock_nested()
877
876
* is correctly annotated.
878
877
*/
879
-
static unsigned int ep_item_poll(const struct epitem *epi, poll_table *pt,
878
+
static __poll_t ep_item_poll(const struct epitem *epi, poll_table *pt,
880
879
int depth)
881
880
{
882
881
struct eventpoll *ep;
···
896
895
locked) & epi->event.events;
897
896
}
898
897
899
-
static int ep_read_events_proc(struct eventpoll *ep, struct list_head *head,
898
+
static __poll_t ep_read_events_proc(struct eventpoll *ep, struct list_head *head,
900
899
void *priv)
901
900
{
902
901
struct epitem *epi, *tmp;
···
1416
1415
static int ep_insert(struct eventpoll *ep, const struct epoll_event *event,
1417
1416
struct file *tfile, int fd, int full_check)
1418
1417
{
1419
-
int error, revents, pwake = 0;
1418
+
int error, pwake = 0;
1419
+
__poll_t revents;
1420
1420
unsigned long flags;
1421
1421
long user_watches;
1422
1422
struct epitem *epi;
···
1615
1613
return 0;
1616
1614
}
1617
1615
1618
-
static int ep_send_events_proc(struct eventpoll *ep, struct list_head *head,
1616
+
static __poll_t ep_send_events_proc(struct eventpoll *ep, struct list_head *head,
1619
1617
void *priv)
1620
1618
{
1621
1619
struct ep_send_events_data *esed = priv;
1622
-
unsigned int revents;
1620
+
__poll_t revents;
1623
1621
struct epitem *epi;
1624
1622
struct epoll_event __user *uevent;
1625
1623
struct wakeup_source *ws;