patch-2.4.15 linux/drivers/block/cpqarray.c

Next file: linux/drivers/block/loop.c
Previous file: linux/drivers/block/cciss.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/drivers/block/cpqarray.c linux/drivers/block/cpqarray.c
@@ -942,6 +942,8 @@
 	if ((c = cmd_alloc(h,1)) == NULL)
 		goto startio;
 
+	blkdev_dequeue_request(creq);
+
 	spin_unlock_irq(&io_request_lock);
 
 	bh = creq->bh;
@@ -987,13 +989,10 @@
 DBGPX(	printk("Submitting %d sectors in %d segments\n", sect, seg); );
 	c->req.hdr.sg_cnt = seg;
 	c->req.hdr.blk_cnt = creq->nr_sectors;
-
-	spin_lock_irq(&io_request_lock);
-
-	blkdev_dequeue_request(creq);
-
 	c->req.hdr.cmd = (creq->cmd == READ) ? IDA_READ : IDA_WRITE;
 	c->type = CMD_RWREQ;
+
+	spin_lock_irq(&io_request_lock);
 
 	/* Put the request on the tail of the request queue */
 	addQ(&h->reqQ, c);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)