Skip to content
Commit 9317d001 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

nvme-fc: fix the fc_appid_store return value

"nvme-fc: fold t fc_update_appid into fc_appid_store" accidentally
changed the userspace interface for the appid attribute, because the code
that decrements "count" to remove a trailing '\n' in the parsing results
in the decremented value being incorrectly be returned from the sysfs
write.  Fix this by keeping an orig_count variable for the full length
of the write.

Fixes: c814153c

 ("nvme-fc: fold t fc_update_appid into fc_appid_store")
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
Reviewed-by: default avatarJames Smart <jsmart2021@gmail.com>
Tested-by: default avatarMuneendra Kumar M <muneendra.kumar@broadcom.com>
parent 6fb271f1
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