[PATCH 1/1] nvme: fix CMB sysfs file removal in reset path

Christoph Hellwig hch at lst.de
Tue Jul 25 08:56:30 PDT 2017


On Tue, Jul 25, 2017 at 04:58:36PM +0300, Max Gurtovoy wrote:
> Currently we create the sysfs entry even if we fail mapping
> it. In that case, the unmapping will not remove the sysfs created
> file.
> 
> Fixes: f63572dff ("nvme: unmap CMB and remove sysfs file in reset path")

This looks correct, but I wonder if the better plan would be to only
add the sysfs file if we have a working CMB?

Also the comment about the auto-removal above the call to
sysfs_add_file_to_group for dev_attr_cmb looks wrong to me, that
might be worth fixing up as well.



More information about the Linux-nvme mailing list