patch-2.3.38 linux/drivers/scsi/scsi_ioctl.c

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

diff -u --recursive --new-file v2.3.37/linux/drivers/scsi/scsi_ioctl.c linux/drivers/scsi/scsi_ioctl.c
@@ -117,13 +117,7 @@
                 return -EINTR;
         }
 
-	{
-		DECLARE_MUTEX_LOCKED(sem);
-		SCpnt->request.sem = &sem;
-		scsi_do_cmd(SCpnt, cmd, NULL, 0, scsi_ioctl_done, timeout, retries);
-		down(&sem);
-		SCpnt->request.sem = NULL;
-	}
+        scsi_wait_cmd(SCpnt, cmd, NULL, 0, scsi_ioctl_done, timeout, retries);
 
 	SCSI_LOG_IOCTL(2, printk("Ioctl returned  0x%x\n", SCpnt->result));
 
@@ -306,14 +300,8 @@
                 return -EINTR;
         }
 
-	{
-		DECLARE_MUTEX_LOCKED(sem);
-		SCpnt->request.sem = &sem;
-		scsi_do_cmd(SCpnt, cmd, buf, needed, scsi_ioctl_done,
-			    timeout, retries);
-		down(&sem);
-		SCpnt->request.sem = NULL;
-	}
+        scsi_wait_cmd(SCpnt, cmd, buf, needed, scsi_ioctl_done,
+                      timeout, retries);
 
 	/* 
 	 * If there was an error condition, pass the info back to the user. 

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