aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-12-09 11:34:45 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-12-13 20:49:18 -0500
commit38d76df2f5483478dee803cb6e39da5e506a6643 (patch)
treedb3a82c6de5cd5328d62df9803e40476bff71fda /drivers/scsi/sd.c
parent4e06cbd42c41f9e49fcfe5ee45c749eefaae9cf4 (diff)
[SCSI] sd: Always do write-protect check
Since nobody has offered an explanation for why the sd driver makes a write-protect check only for devices with removable media, I'm submitting this patch to get rid of the removable-media test. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 8613a1317712..d82795455efb 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1509,9 +1509,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
1509 */ 1509 */
1510 if (sdkp->media_present) { 1510 if (sdkp->media_present) {
1511 sd_read_capacity(sdkp, disk->disk_name, buffer); 1511 sd_read_capacity(sdkp, disk->disk_name, buffer);
1512 if (sdp->removable) 1512 sd_read_write_protect_flag(sdkp, disk->disk_name, buffer);
1513 sd_read_write_protect_flag(sdkp, disk->disk_name,
1514 buffer);
1515 sd_read_cache_type(sdkp, disk->disk_name, buffer); 1513 sd_read_cache_type(sdkp, disk->disk_name, buffer);
1516 } 1514 }
1517 1515