mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
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> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
This commit is contained in:
parent
edb394b512
commit
5cb9b40d61
1 changed files with 1 additions and 1 deletions
|
@ -898,7 +898,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,
|
||||
|
|
Loading…
Reference in a new issue