From: Muthukumar Ratty Date: Fri, 29 Jun 2012 15:31:49 +0000 (+0000) Subject: [SCSI] block: Fix blk_execute_rq_nowait() dead queue handling X-Git-Tag: v3.6-rc1~103^2~56 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e81ca6fe85b77109a32489a5db82f575d51dfc98;p=pandora-kernel.git [SCSI] block: Fix blk_execute_rq_nowait() dead queue handling If the queue is dead blk_execute_rq_nowait() doesn't invoke the done() callback function. That will result in blk_execute_rq() being stuck in wait_for_completion(). Avoid this by initializing rq->end_io to the done() callback before we check the queue state. Also, make sure the queue lock is held around the invocation of the done() callback. Found this through source code review. Signed-off-by: Muthukumar Ratty Signed-off-by: Bart Van Assche Reviewed-by: Tejun Heo Acked-by: Jens Axboe Signed-off-by: James Bottomley --- Reading git-diff-tree failed