mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
parent
67a61c4847
commit
cf795bfb3a
1 changed files with 2 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue