patch-2.4.15 linux/drivers/scsi/sd.c
Next file: linux/drivers/scsi/st.c
Previous file: linux/drivers/scsi/scsi.h
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Fri Nov 9 14:05:06 2001
- Orig file:
v2.4.14/linux/drivers/scsi/sd.c
- Orig date:
Mon Nov 5 15:55:32 2001
diff -u --recursive --new-file v2.4.14/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c
@@ -230,11 +230,8 @@
return -EFAULT;
return 0;
}
- case BLKGETSIZE: /* Return device size */
- return put_user(sd[SD_PARTITION(inode->i_rdev)].nr_sects, (unsigned long *) arg);
+ case BLKGETSIZE:
case BLKGETSIZE64:
- return put_user((u64)sd[SD_PARTITION(inode->i_rdev)].nr_sects << 9, (u64 *)arg);
-
case BLKROSET:
case BLKROGET:
case BLKRASET:
@@ -459,8 +456,10 @@
* is being re-read.
*/
- while (rscsi_disks[target].device->busy)
+ while (rscsi_disks[target].device->busy) {
barrier();
+ cpu_relax();
+ }
/*
* The following code can sleep.
* Module unloading must be prevented
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)