提交 3e875238 编写于 作者: M Mikulas Patocka 提交者: Ingo Molnar

sched/wait: Remove might_sleep() from wait_event_cmd()

The patch e22b886a ("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: e22b886a ("sched/wait: Add might_sleep() checks")
Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: NPeter 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.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 bb2bc55a
...@@ -363,7 +363,6 @@ do { \ ...@@ -363,7 +363,6 @@ do { \
*/ */
#define wait_event_cmd(wq, condition, cmd1, cmd2) \ #define wait_event_cmd(wq, condition, cmd1, cmd2) \
do { \ do { \
might_sleep(); \
if (condition) \ if (condition) \
break; \ break; \
__wait_event_cmd(wq, condition, cmd1, cmd2); \ __wait_event_cmd(wq, condition, cmd1, cmd2); \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册