patch-2.1.90 linux/drivers/scsi/sd.c

Next file: linux/drivers/scsi/wd7000.c
Previous file: linux/drivers/scsi/scsi_queue.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.89/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c
@@ -1598,15 +1598,14 @@
     target =  DEVICE_NR(dev);
     gdev = &GENDISK_STRUCT;
 
-    save_flags(flags);
-    cli();
+    spin_lock_irqsave(&io_request_lock, flags);
     if (DEVICE_BUSY || USAGE > maxusage) {
-	restore_flags(flags);
+	spin_unlock_irqrestore(&io_request_lock, flags);
 	printk("Device busy for revalidation (usage=%d)\n", USAGE);
 	return -EBUSY;
     }
     DEVICE_BUSY = 1;
-    restore_flags(flags);
+    spin_unlock_irqrestore(&io_request_lock, flags);
 
     max_p = gdev->max_p;
     start = target << gdev->minor_shift;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov