[GIT,PULL] nvme updates for Linux 4.15
diff mbox

Message ID 20171111084346.GA24802@infradead.org
State New
Headers show

Commit Message

Christoph Hellwig Nov. 11, 2017, 8:43 a.m. UTC
Do you want to apply this forward ported version of the patch
to your for-4.15/block tree?  That should at least make the conflict
go away for Linus when he pulls it.

---
From 9a687c554af721a7a4d77a82d6d8be4e66c1e1a0 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Thu, 28 Sep 2017 21:33:23 +0200
Subject: nvme: fix visibility of "uuid" ns attribute

"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>
[hch: rebased to the nvme-4.15 tree to help resolving a conflict]
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jens Axboe Nov. 11, 2017, 10:37 p.m. UTC | #1
On 11/11/2017 01:43 AM, Christoph Hellwig wrote:
> Do you want to apply this forward ported version of the patch
> to your for-4.15/block tree?  That should at least make the conflict
> go away for Linus when he pulls it.

Yeah I will probably add that. I won't kill the conflict, but it'll
make it more logically solvable.

Patch
diff mbox

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index b4d649039665..592fa6af227f 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2524,7 +2524,7 @@  static umode_t nvme_ns_id_attrs_are_visible(struct kobject *kobj,
 	struct nvme_ns_ids *ids = &dev_to_ns_head(dev)->ids;
 
 	if (a == &dev_attr_uuid.attr) {
-		if (uuid_is_null(&ids->uuid) ||
+		if (uuid_is_null(&ids->uuid) &&
 		    !memchr_inv(ids->nguid, 0, sizeof(ids->nguid)))
 			return 0;
 	}