summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
authorPeter Oberparleiter <oberpar@linux.vnet.ibm.com>2015-10-27 10:49:54 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2015-11-09 12:26:31 -0500
commit863e02d0e173bb9d8cea6861be22820b25c076cc (patch)
tree3835a8c70034c73503159edcb280c3a1c5884b29 /drivers/scsi/scsi_sysfs.c
parent92e6246c8e02f4ce9960731e2411e49c1f0fabbf (diff)
downloadlinux-863e02d0e173bb9d8cea6861be22820b25c076cc.tar.gz
linux-863e02d0e173bb9d8cea6861be22820b25c076cc.tar.bz2
linux-863e02d0e173bb9d8cea6861be22820b25c076cc.zip
scsi_sysfs: Fix queue_ramp_up_period return code
Writing a number to /sys/bus/scsi/devices/<sdev>/queue_ramp_up_period returns the value of that number instead of the number of bytes written. This behavior can confuse programs expecting POSIX write() semantics. Fix this by returning the number of bytes written instead. Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Cc: stable@vger.kernel.org Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r--drivers/scsi/scsi_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index fdcf0abe613f..8b7fa8aece66 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -921,7 +921,7 @@ sdev_store_queue_ramp_up_period(struct device *dev,
return -EINVAL;
sdev->queue_ramp_up_period = msecs_to_jiffies(period);
- return period;
+ return count;
}
static DEVICE_ATTR(queue_ramp_up_period, S_IRUGO | S_IWUSR,