From: Pierre Ossman Date: Sat, 28 Apr 2007 14:52:12 +0000 (+0200) Subject: mmc: allow suspended block driver to be removed X-Git-Tag: v2.6.22-rc1~1032^2~16 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2b46f66b4b342be07a4194bd5e82384d07e470d;p=linux-2.6 mmc: allow suspended block driver to be removed Make sure we don't deadlock when removing a suspended block queue, something that might happen if the card is removed during suspend. Signed-off-by: Pierre Ossman --- diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index aa75ac11a1..2e77963db3 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -191,6 +191,9 @@ void mmc_cleanup_queue(struct mmc_queue *mq) q->queuedata = NULL; spin_unlock_irqrestore(q->queue_lock, flags); + /* Make sure the queue isn't suspended, as that will deadlock */ + mmc_queue_resume(mq); + /* Then terminate our worker thread */ kthread_stop(mq->thread);