aboutsummaryrefslogtreecommitdiffstats
path: root/fs/eventpoll.c
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>2007-10-19 02:39:56 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:38 -0400
commitb70c394099851c1398e9fd0fd64cf13ef2d093a1 (patch)
treef030f8eed8ea257765f18f43dc3200dad054d3ea /fs/eventpoll.c
parentcfdaf9e5f95993264b5aee7cbb9dd16977bc11ed (diff)
fs/eventpoll.c: use list_for_each_entry() instead of list_for_each()
fs/eventpoll.c: use list_for_each_entry() instead of list_for_each() in ep_poll_safewake() Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r--fs/eventpoll.c5
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)) {