scsi_sysfs: Fix queue_ramp_up_period return code
authorPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Tue, 27 Oct 2015 09:49:54 +0000 (10:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Feb 2016 19:57:47 +0000 (11:57 -0800)
commitf7d615b9cc7bcfaf064d715770b061b995b44bce
tree8a5e445894a15c2bb766ab6285e9fd2ce1d2a748
parent2544cce12c7bd18e880b09c21b1a2d944a3423eb
scsi_sysfs: Fix queue_ramp_up_period return code

commit 863e02d0e173bb9d8cea6861be22820b25c076cc 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: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/scsi_sysfs.c