提交 cf795bfb 编写于 作者: P Pierre Ossman

mmc: add a might_sleep() to mmc_claim_host()

In the normal case, the host lock can be claimed directly.
When it cannot, the caller will sleep. Make sure we don't
have any latent bugs by always calling might_sleep().
Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
上级 67a61c48
......@@ -260,6 +260,8 @@ void mmc_claim_host(struct mmc_host *host)
DECLARE_WAITQUEUE(wait, current);
unsigned long flags;
might_sleep();
add_wait_queue(&host->wq, &wait);
spin_lock_irqsave(&host->lock, flags);
while (1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册