SCSI: sd: Fix parsing of 'temporary ' cache mode prefix
commit2ee3e26c67upstream. Commit39c60a0948'[SCSI] sd: fix array cache flushing bug causing performance problems' added temp as a pointer to "temporary " and used sizeof(temp) - 1 as its length. But sizeof(temp) is the size of the pointer, not the size of the string constant. Change temp to a static array so that sizeof() does what was intended. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5583db3830
commit
3bb0ab9e10
1 changed files with 1 additions and 1 deletions
|
|
@ -138,7 +138,7 @@ sd_store_cache_type(struct device *dev, struct device_attribute *attr,
|
|||
char *buffer_data;
|
||||
struct scsi_mode_data data;
|
||||
struct scsi_sense_hdr sshdr;
|
||||
const char *temp = "temporary ";
|
||||
static const char temp[] = "temporary ";
|
||||
int len;
|
||||
|
||||
if (sdp->type != TYPE_DISK)
|
||||
|
|
|
|||
Loading…
Reference in a new issue