* [PATCH 1/3] nvme: fix visibility of "uuid" ns attribute
@ 2017-09-28 19:33 Martin Wilck
2017-10-01 7:58 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Martin Wilck @ 2017-09-28 19:33 UTC (permalink / raw)
"uuid" must be invisible if both ns->uuid and ns->nguid are unset,
not if either one is.
Fixes: d934f9848a77 "nvme: provide UUID value to userspace"
Signed-off-by: Martin Wilck <mwilck at suse.com>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index bb2aad078637..5a14cc7f28ee 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2136,7 +2136,7 @@ static umode_t nvme_ns_attrs_are_visible(struct kobject *kobj,
struct nvme_ns *ns = nvme_get_ns_from_dev(dev);
if (a == &dev_attr_uuid.attr) {
- if (uuid_is_null(&ns->uuid) ||
+ if (uuid_is_null(&ns->uuid) &&
!memchr_inv(ns->nguid, 0, sizeof(ns->nguid)))
return 0;
}
--
2.14.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 1/3] nvme: fix visibility of "uuid" ns attribute
2017-09-28 19:33 [PATCH 1/3] nvme: fix visibility of "uuid" ns attribute Martin Wilck
@ 2017-10-01 7:58 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2017-10-01 7:58 UTC (permalink / raw)
Thanks,
applied to nvme-4.14.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-01 7:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-28 19:33 [PATCH 1/3] nvme: fix visibility of "uuid" ns attribute Martin Wilck
2017-10-01 7:58 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).