[PATCH] nvme-fc: fix the fc_appid_store return value

Chaitanya Kulkarni chaitanyak at nvidia.com
Sun Aug 7 02:21:42 PDT 2022


On 8/6/22 01:32, Christoph Hellwig wrote:
> "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: c814153c83a8 ("nvme-fc: fold t fc_update_appid into fc_appid_store")
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> Reviewed-by: Ewan D. Milne <emilne at redhat.com>
> Reviewed-by: James Smart <jsmart2021 at gmail.com>
> Tested-by:  Muneendra Kumar M <muneendra.kumar at broadcom.com>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>

-ck




More information about the Linux-nvme mailing list