patch-1.3.82 linux/drivers/block/md.c

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

diff -u --recursive --new-file v1.3.81/linux/drivers/block/md.c linux/drivers/block/md.c
@@ -389,6 +389,7 @@
 static void do_md_request (void)
 {
   int minor;
+  long flags;
   struct request *req;
     
   while (1)
@@ -396,12 +397,13 @@
 #ifdef MD_COUNT_SIZE
     int reqsize, chunksize;
 #endif
-    
+
+    save_flags (flags);
     cli ();
     req = blk_dev[MD_MAJOR].current_request;
     if (!req || (req->rq_status == RQ_INACTIVE))
     {
-      sti ();
+      restore_flags (flags);
       return;
     }
     
@@ -414,7 +416,7 @@
 #endif
     
     blk_dev[MD_MAJOR].current_request = req->next;
-    sti ();
+    restore_flags (flags);
 
     minor = MINOR(req->rq_dev);
     if ((MAJOR(req->rq_dev) != MD_MAJOR) || (minor >= MAX_REAL))
@@ -486,7 +488,7 @@
 
       while (req && !found)
       {
-	if (req->rq_status!=RQ_ACTIVE)
+	if (req->rq_status!=RQ_ACTIVE && &blk_dev[major].plug!=req)
 	  printk ("Saw bad status request !\n");
 
 	if (req->rq_dev == dev &&

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this