patch-2.1.95 linux/drivers/block/ll_rw_blk.c
Next file: linux/drivers/char/tga.c
Previous file: linux/drivers/block/ide.c
Back to the patch index
Back to the overall index
-  Lines: 34
-  Date:
Thu Apr  9 13:44:53 1998
-  Orig file: 
v2.1.94/linux/drivers/block/ll_rw_blk.c
-  Orig date: 
Mon Apr  6 17:40:59 1998
diff -u --recursive --new-file v2.1.94/linux/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
@@ -148,8 +148,6 @@
 			queue_new_request = 1;
 		}
 	}
-	spin_unlock_irqrestore(&io_request_lock,flags);
-
 	if (queue_new_request)
 		/*
 		 * request functions are smart enough to notice a change
@@ -157,6 +155,8 @@
 		 * is OK, i think. <-- FIXME: [is this true? --mingo]
 		 */
 		(dev->request_fn)();
+
+	spin_unlock_irqrestore(&io_request_lock,flags);
 }
 
 /*
@@ -348,14 +348,13 @@
 	if (scsi_blk_major(MAJOR(req->rq_dev)))
 		queue_new_request = 1;
 out:
-	spin_unlock_irqrestore(&io_request_lock,flags);
-
 	/*
 	 * request_fn() is usually a quite complex and slow function,
 	 * we want to call it with no spinlocks held
 	 */
 	if (queue_new_request)
 		(dev->request_fn)();
+	spin_unlock_irqrestore(&io_request_lock,flags);
 }
 
 /*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov