All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nvme-cli] fix path->nentry bugs
@ 2021-09-09 14:57 chengjike
  2021-09-09 16:19 ` Chaitanya Kulkarni
  2021-09-09 16:48 ` Keith Busch
  0 siblings, 2 replies; 4+ messages in thread
From: chengjike @ 2021-09-09 14:57 UTC (permalink / raw)
  To: kbusch, linux-nvme; +Cc: sunao.sun, chengjike.cheng, jiangtao62

The "path->nentry" is initialized after it is added to the list in "nvme_subsystem_set_path_ns" function.

Signed-off-by: chengjike <chengjike.cheng@huawei.com>
---
 src/nvme/tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nvme/tree.c b/src/nvme/tree.c
index 49815db..293b0c0 100644
--- a/src/nvme/tree.c
+++ b/src/nvme/tree.c
@@ -534,7 +534,6 @@ static int nvme_ctrl_scan_path(struct nvme_ctrl *c, char *name)
 	p->name = strdup(name);
 	p->sysfs_dir = path;
 	p->ana_state = nvme_get_path_attr(p, "ana_state");
-	nvme_subsystem_set_path_ns(c->s, p);
 
 	grpid = nvme_get_path_attr(p, "ana_grpid");
 	if (grpid) {
@@ -543,6 +542,7 @@ static int nvme_ctrl_scan_path(struct nvme_ctrl *c, char *name)
 	}
 
 	list_node_init(&p->nentry);
+	nvme_subsystem_set_path_ns(c->s, p);
 	list_node_init(&p->entry);
 	list_add(&c->paths, &p->entry);
 	return 0;
-- 
2.21.0.windows.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH nvme-cli] fix path->nentry bugs
  2021-09-09 14:57 [PATCH nvme-cli] fix path->nentry bugs chengjike
@ 2021-09-09 16:19 ` Chaitanya Kulkarni
  2021-09-09 16:47   ` Keith Busch
  2021-09-09 16:48 ` Keith Busch
  1 sibling, 1 reply; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-09-09 16:19 UTC (permalink / raw)
  To: linux-nvme

On 9/9/21 7:57 AM, chengjike wrote:
> The "path->nentry" is initialized after it is added to the list in "nvme_subsystem_set_path_ns" function.
> 

Overally long commit message, plz send.

> Signed-off-by: chengjike <chengjike.cheng@huawei.com>
> ---
>   src/nvme/tree.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/nvme/tree.c b/src/nvme/tree.c
> index 49815db..293b0c0 100644
> --- a/src/nvme/tree.c
> +++ b/src/nvme/tree.c
> @@ -534,7 +534,6 @@ static int nvme_ctrl_scan_path(struct nvme_ctrl *c, char *name)
>   	p->name = strdup(name);
>   	p->sysfs_dir = path;
>   	p->ana_state = nvme_get_path_attr(p, "ana_state");
> -	nvme_subsystem_set_path_ns(c->s, p);
>   
>   	grpid = nvme_get_path_attr(p, "ana_grpid");
>   	if (grpid) {
> @@ -543,6 +542,7 @@ static int nvme_ctrl_scan_path(struct nvme_ctrl *c, char *name)
>   	}
>   
>   	list_node_init(&p->nentry);
> +	nvme_subsystem_set_path_ns(c->s, p);
>   	list_node_init(&p->entry);
>   	list_add(&c->paths, &p->entry);
>   	return 0;
> 
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH nvme-cli] fix path->nentry bugs
  2021-09-09 16:19 ` Chaitanya Kulkarni
@ 2021-09-09 16:47   ` Keith Busch
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2021-09-09 16:47 UTC (permalink / raw)
  To: Chaitanya Kulkarni; +Cc: linux-nvme

On Thu, Sep 09, 2021 at 04:19:05PM +0000, Chaitanya Kulkarni wrote:
> On 9/9/21 7:57 AM, chengjike wrote:
> > The "path->nentry" is initialized after it is added to the list in "nvme_subsystem_set_path_ns" function.
> > 
> 
> Overally long commit message, plz send.

I fixed it. Pushed to libnvme.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH nvme-cli] fix path->nentry bugs
  2021-09-09 14:57 [PATCH nvme-cli] fix path->nentry bugs chengjike
  2021-09-09 16:19 ` Chaitanya Kulkarni
@ 2021-09-09 16:48 ` Keith Busch
  1 sibling, 0 replies; 4+ messages in thread
From: Keith Busch @ 2021-09-09 16:48 UTC (permalink / raw)
  To: chengjike; +Cc: linux-nvme, sunao.sun, jiangtao62

Applied to libnvme.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-09 16:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 14:57 [PATCH nvme-cli] fix path->nentry bugs chengjike
2021-09-09 16:19 ` Chaitanya Kulkarni
2021-09-09 16:47   ` Keith Busch
2021-09-09 16:48 ` Keith Busch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.