Skip to content
Commit 7854de57 authored by Mike Christie's avatar Mike Christie Committed by Greg Kroah-Hartman
Browse files

scsi: core: sysfs: Fix setting device state to SDEV_RUNNING

[ Upstream commit eb97545d ]

This fixes an issue added in commit 4edd8cd4 ("scsi: core: sysfs: Fix
hang when device state is set via sysfs") where if userspace is requesting
to set the device state to SDEV_RUNNING when the state is already
SDEV_RUNNING, we return -EINVAL instead of count. The commmit above set ret
to count for this case, when it should have set it to 0.

Link: https://lore.kernel.org/r/20211120164917.4924-1-michael.christie@oracle.com
Fixes: 4edd8cd4

 ("scsi: core: sysfs: Fix hang when device state is set via sysfs")
Reviewed-by: default avatarLee Duncan <lduncan@suse.com>
Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 67a6f64a
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