From: 黄涛 Date: Sat, 23 Mar 2013 01:24:16 +0000 (+0800) Subject: block: fix loop on blk_drain_queue when __dm_destroy X-Git-Tag: firefly_0821_release~7359 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d36caf0ebf572bcc62909fc20312480b4f5e8148;p=firefly-linux-kernel-4.4.55.git block: fix loop on blk_drain_queue when __dm_destroy when install apk to sdcard, vold will loop on blk_drain_queue: vold D c090e3a8 0 119 1 0x00000000 [] (__schedule+0x3b0/0x85c) from [] (schedule_timeout+0x160/0x2dc) [] (schedule_timeout+0x160/0x2dc) from [] (msleep+0x14/0x20) [] (msleep+0x14/0x20) from [] (blk_cleanup_queue+0xb4/0x218) [] (blk_cleanup_queue+0xb4/0x218) from [] (__dm_destroy+0x170/0x1c4) [] (__dm_destroy+0x170/0x1c4) from [] (dev_remove+0x74/0xa8) [] (dev_remove+0x74/0xa8) from [] (dm_ctl_ioctl+0x1e4/0x2d4) [] (dm_ctl_ioctl+0x1e4/0x2d4) from [] (do_vfs_ioctl+0x80/0x5b0) [] (do_vfs_ioctl+0x80/0x5b0) from [] (sys_ioctl+0x38/0x60) [] (sys_ioctl+0x38/0x60) from [] (ret_fast_syscall+0x0/0x30) --- diff --git a/block/blk-core.c b/block/blk-core.c index 829da3295798..17db3c410518 100755 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -377,7 +377,7 @@ static void blk_drain_queue(struct request_queue *q) * multiple places and there's no single counter which can * be drained. Check all the queues and counters. */ - drain |= !list_empty(&q->queue_head); +// drain |= !list_empty(&q->queue_head); for (i = 0; i < 2; i++) { drain |= q->rq.count[i]; drain |= q->in_flight[i];