From: Alan Stern Date: Fri, 9 Dec 2005 16:34:45 +0000 (-0500) Subject: [SCSI] sd: Always do write-protect check X-Git-Tag: v2.6.16-rc1~474^2~22^2~8^2~23 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38d76df2f5483478dee803cb6e39da5e506a6643;p=linux-2.6 [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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 8613a13177..d82795455e 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); }