projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5f3d8a
)
nvme: fix visibility of "uuid" ns attribute
author
Martin Wilck
<mwilck@suse.com>
Thu, 28 Sep 2017 19:33:23 +0000
(21:33 +0200)
committer
Christoph Hellwig
<hch@lst.de>
Sun, 1 Oct 2017 07:58:04 +0000
(09:58 +0200)
"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@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/nvme/host/core.c
b/drivers/nvme/host/core.c
index bb2aad07863736c44adbcad9f43f0efb14d17bb7..5a14cc7f28ee75e930f8aca11e35443812720536 100644
(file)
--- 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;
}