Skip to content

Commit

Permalink
mmc: allow suspended block driver to be removed
Browse files Browse the repository at this point in the history
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 <drzeus@drzeus.cx>
  • Loading branch information
Pierre Ossman committed May 1, 2007
1 parent 3b91e55 commit d2b46f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/mmc/card/queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d2b46f6

Please sign in to comment.