mtd/drivers/mtd mtd_blkdevs.c,1.12,1.13

David Woodhouse dwmw2 at infradead.org
Sun Jun 15 13:04:39 EDT 2003


Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv19214

Modified Files:
	mtd_blkdevs.c 
Log Message:
Fix queue locking in request thread.

Index: mtd_blkdevs.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtd_blkdevs.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- mtd_blkdevs.c	21 May 2003 01:00:59 -0000	1.12
+++ mtd_blkdevs.c	15 Jun 2003 17:04:37 -0000	1.13
@@ -93,14 +93,14 @@
 	recalc_sigpending();
 	spin_unlock_irq(&current->sighand->siglock);
 
+	spin_lock_irq(rq->queue_lock);
+		
 	while (!tr->blkcore_priv->exiting) {
 		struct request *req;
 		struct mtd_blktrans_dev *dev;
 		int res = 0;
 		DECLARE_WAITQUEUE(wait, current);
 
-		spin_lock_irq(rq->queue_lock);
-
 		req = elv_next_request(rq);
 
 		if (!req) {
@@ -111,6 +111,8 @@
 
 			schedule();
 			remove_wait_queue(&tr->blkcore_priv->thread_wq, &wait);
+
+			spin_lock_irq(rq->queue_lock);
 
 			continue;
 		}




More information about the linux-mtd-cvs mailing list