nvme-pci: refresh visible attrs for cmb attributes
authorKeith Busch <kbusch@kernel.org>
Thu, 16 Feb 2023 16:44:03 +0000 (08:44 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:59:56 +0000 (12:59 +0100)
commit02f81e0256d080adbe3fb9d9fb412b042d226963
treef85fd964d052c5a56835afb0e84878a3b6ba77fb
parent70fdd9831a5fe2cc405588a3d9e3df6ee6127c8b
nvme-pci: refresh visible attrs for cmb attributes

commit e917a849c3fc317c4a5f82bb18726000173d39e6 upstream.

The sysfs group containing the cmb attributes is registered before the
driver knows if they need to be visible or not. Update the group when
cmb attributes are known to exist so the visibility setting is correct.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217037
Fixes: 86adbf0cdb9ec65 ("nvme: simplify transport specific device attribute handling")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/pci.c