aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/eventpoll.c2
-rw-r--r--include/linux/wait.h16
2 files changed, 17 insertions, 1 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 81c04abfb1aa..a415f42d32cf 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -353,7 +353,7 @@ static void ep_poll_safewake(struct poll_safewake *psw, wait_queue_head_t *wq)
353 spin_unlock_irqrestore(&psw->lock, flags); 353 spin_unlock_irqrestore(&psw->lock, flags);
354 354
355 /* Do really wake up now */ 355 /* Do really wake up now */
356 wake_up(wq); 356 wake_up_nested(wq, 1 + wake_nests);
357 357
358 /* Remove the current task from the list */ 358 /* Remove the current task from the list */
359 spin_lock_irqsave(&psw->lock, flags); 359 spin_lock_irqsave(&psw->lock, flags);
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 1f4fb0a81ecd..33a2aa9e02f2 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -162,6 +162,22 @@ wait_queue_head_t *FASTCALL(bit_waitqueue(void *, int));
162#define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL) 162#define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL)
163#define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1) 163#define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1)
164 164
165#ifdef CONFIG_DEBUG_LOCK_ALLOC
166/*
167 * macro to avoid include hell
168 */
169#define wake_up_nested(x, s) \
170do { \
171 unsigned long flags; \
172 \
173 spin_lock_irqsave_nested(&(x)->lock, flags, (s)); \
174 wake_up_locked(x); \
175 spin_unlock_irqrestore(&(x)->lock, flags); \
176} while (0)
177#else
178#define wake_up_nested(x, s) wake_up(x)
179#endif
180
165#define __wait_event(wq, condition) \ 181#define __wait_event(wq, condition) \
166do { \ 182do { \
167 DEFINE_WAIT(__wait); \ 183 DEFINE_WAIT(__wait); \