Commit 863e02d0 authored by Peter Oberparleiter's avatar Peter Oberparleiter Committed by Martin K. Petersen

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: default avatarPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 92e6246c
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment