Skip to content

Commit

Permalink
sched/wait: Remove might_sleep() from wait_event_cmd()
Browse files Browse the repository at this point in the history
The patch e22b886 ("sched/wait: Add might_sleep() checks")
introduced a bug in the raid5 subsystem.

The function raid5_quiesce() (and resize_stripes()) uses the 'cmd'
part to release and acquire a spinlock (so we call the sleep
primitives in atomic context), and therefore we cannot do the
might_sleep() check.

Remove it.

Fixes: e22b886 ("sched/wait: Add might_sleep() checks")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1502020935580.13510@file01.intranet.prod.int.rdu2.redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Mikulas Patocka authored and Ingo Molnar committed Feb 3, 2015
1 parent bb2bc55 commit 3e87523
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/linux/wait.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ do { \
*/
#define wait_event_cmd(wq, condition, cmd1, cmd2) \
do { \
might_sleep(); \
if (condition) \
break; \
__wait_event_cmd(wq, condition, cmd1, cmd2); \
Expand Down

0 comments on commit 3e87523

Please sign in to comment.