patch-2.1.31 linux/drivers/scsi/sd.c
Next file: linux/drivers/scsi/sg.c
Previous file: linux/drivers/scsi/scsi.h
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Wed Apr 2 17:43:21 1997
- Orig file:
v2.1.30/linux/drivers/scsi/sd.c
- Orig date:
Tue Mar 4 10:25:24 1997
diff -u --recursive --new-file v2.1.30/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c
@@ -147,7 +147,7 @@
return 0;
}
-static void sd_release(struct inode * inode, struct file * file)
+static int sd_release(struct inode * inode, struct file * file)
{
int target;
fsync_dev(inode->i_rdev);
@@ -165,6 +165,7 @@
__MOD_DEC_USE_COUNT(rscsi_disks[target].device->host->hostt->module);
if(sd_template.module)
__MOD_DEC_USE_COUNT(sd_template.module);
+ return 0;
}
static void sd_geninit(struct gendisk *);
@@ -491,7 +492,7 @@
* from user space, since we do not want to
* sleep from an interrupt.
*/
- if( SDev->removable && !intr_count )
+ if( SDev->removable && !in_interrupt() )
{
scsi_ioctl(SDev, SCSI_IOCTL_DOORLOCK, 0);
/* scsi_ioctl may allow CURRENT to change, so start over. */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov