summaryrefslogtreecommitdiff
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 18:49:18 -0700
commit38d76df2f5483478dee803cb6e39da5e506a6643 (patch)
treedb3a82c6de5cd5328d62df9803e40476bff71fda /drivers/scsi/sd.c
parent4e06cbd42c41f9e49fcfe5ee45c749eefaae9cf4 (diff)
downloadlwn-38d76df2f5483478dee803cb6e39da5e506a6643.tar.gz
lwn-38d76df2f5483478dee803cb6e39da5e506a6643.zip
[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)
*/
if (sdkp->media_present) {
sd_read_capacity(sdkp, disk->disk_name, buffer);
- if (sdp->removable)
- sd_read_write_protect_flag(sdkp, disk->disk_name,
- buffer);
+ sd_read_write_protect_flag(sdkp, disk->disk_name, buffer);
sd_read_cache_type(sdkp, disk->disk_name, buffer);
}