Commit 54c4a58c authored by Peter Oberparleiter's avatar Peter Oberparleiter Committed by Jiri Slaby

scsi_sysfs: Fix queue_ramp_up_period return code

commit 863e02d0 upstream.

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>
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>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 259d9d2f
......@@ -829,7 +829,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 struct device_attribute sdev_attr_queue_ramp_up_period =
......
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