diff options
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r-- | fs/eventpoll.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index de6189291954..34f68f3a069a 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -325,15 +325,14 @@ static void ep_poll_safewake(struct poll_safewake *psw, wait_queue_head_t *wq) | |||
325 | int wake_nests = 0; | 325 | int wake_nests = 0; |
326 | unsigned long flags; | 326 | unsigned long flags; |
327 | struct task_struct *this_task = current; | 327 | struct task_struct *this_task = current; |
328 | struct list_head *lsthead = &psw->wake_task_list, *lnk; | 328 | struct list_head *lsthead = &psw->wake_task_list; |
329 | struct wake_task_node *tncur; | 329 | struct wake_task_node *tncur; |
330 | struct wake_task_node tnode; | 330 | struct wake_task_node tnode; |
331 | 331 | ||
332 | spin_lock_irqsave(&psw->lock, flags); | 332 | spin_lock_irqsave(&psw->lock, flags); |
333 | 333 | ||
334 | /* Try to see if the current task is already inside this wakeup call */ | 334 | /* Try to see if the current task is already inside this wakeup call */ |
335 | list_for_each(lnk, lsthead) { | 335 | list_for_each_entry(tncur, lsthead, llink) { |
336 | tncur = list_entry(lnk, struct wake_task_node, llink); | ||
337 | 336 | ||
338 | if (tncur->wq == wq || | 337 | if (tncur->wq == wq || |
339 | (tncur->task == this_task && ++wake_nests > EP_MAX_POLLWAKE_NESTS)) { | 338 | (tncur->task == this_task && ++wake_nests > EP_MAX_POLLWAKE_NESTS)) { |