Messages in this thread Patch in this message | | | From | Maxim Levitsky <> | Subject | [PATCH 1/2] MEMSTICK: fix hangs on unexpected device removal in mspro_blk | Date | Tue, 3 Aug 2010 17:53:05 +0300 |
| |
Now that del_gendisk syncs, we better start rejecting requests right away.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> --- drivers/memstick/core/mspro_block.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c index 8327e24..8d27c13 100644 --- a/drivers/memstick/core/mspro_block.c +++ b/drivers/memstick/core/mspro_block.c @@ -1330,13 +1330,14 @@ static void mspro_block_remove(struct memstick_dev *card) struct mspro_block_data *msb = memstick_get_drvdata(card); unsigned long flags; - del_gendisk(msb->disk); - dev_dbg(&card->dev, "mspro block remove\n"); spin_lock_irqsave(&msb->q_lock, flags); msb->eject = 1; blk_start_queue(msb->queue); spin_unlock_irqrestore(&msb->q_lock, flags); + del_gendisk(msb->disk); + dev_dbg(&card->dev, "mspro block remove\n"); + blk_cleanup_queue(msb->queue); msb->queue = NULL; -- 1.7.0.4
| |