From: Tejun Heo Date: Tue, 6 Mar 2012 20:24:55 +0000 (+0100) Subject: block: blk-throttle should be drained regardless of q->elevator X-Git-Tag: v3.5-rc1~42^2~93 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b855b04a0b2213dbc1b59cf936056726e7ed97ad;p=pandora-kernel.git block: blk-throttle should be drained regardless of q->elevator Currently, blk_cleanup_queue() doesn't call elv_drain_elevator() if q->elevator doesn't exist; however, bio based drivers don't have elevator initialized but can still use blk-throttle. This patch moves q->elevator test inside blk_drain_queue() such that only elv_drain_elevator() is skipped if !q->elevator. -v2: loop can have registered queue which has NULL request_fn. Make sure we don't call into __blk_run_queue() in such cases. Signed-off-by: Tejun Heo Reported-by: Vivek Goyal Fold in bug fix from Vivek. Signed-off-by: Jens Axboe --- Reading git-diff-tree failed