fix path->nentry bugs
PATCH 1/1 fix path->nentry bugs
The "path->nentry" is initialized after it is added to the list in "nvme_subsystem_set_path_ns" function.
--- src/nvme/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/nvme/tree.c +1 -1
@@ -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 ;
Signature · 7 lines
2.21.0.windows.1 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Quoted 2 lines · chengjike
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.
Quoted 19 lines
Signed-off-by chengjike <[email protected]>--- src/nvme/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/nvme/tree.c +0
-1@@ -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) {
src/nvme/tree.c static int nvme_ctrl_scan_path(struct nvme_ctrl *c, char *name) · line 548
Quoted 7 lines
src/nvme/tree.c +1
-0@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keith Busch
maintainerQuoted 5 lines · Chaitanya Kulkarni
Quoted 2 lines · chengjike
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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Applied to libnvme.
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme