ide: Must hold queue lock when requeueing
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 31 Mar 2010 20:13:39 +0000 (20:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Apr 2010 08:31:14 +0000 (01:31 -0700)
ide-atapi requeues requests without holding the queue lock.
This patch fixes it by using ide_requeue_and_plug.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ide/ide-atapi.c

index eb2181a6a11cbe9dfd825daae8c03a73aa85fc19..9aedb9aa544ff36b6ad3e12329c6b58c359c0de1 100644 (file)
@@ -263,8 +263,8 @@ void ide_retry_pc(ide_drive_t *drive)
         * of it.  The failed command will be retried after sense data
         * is acquired.
         */
-       blk_requeue_request(failed_rq->q, failed_rq);
        drive->hwif->rq = NULL;
+       ide_requeue_and_plug(drive, failed_rq);
        if (ide_queue_sense_rq(drive, pc)) {
                blk_start_request(failed_rq);
                ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq));