Skip to content

Commit

Permalink
[SCSI] sd: Always do write-protect check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Stern authored and James Bottomley committed Dec 14, 2005
1 parent 4e06cbd commit 38d76df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 38d76df

Please sign in to comment.