This is where this operation logically belongs.

Signed-off-by: Martin Wilck <[email protected]>
---
 libmultipath/structs.c     | 1 +
 libmultipath/structs_vec.c | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/structs.c b/libmultipath/structs.c
index 4d993be..29c0008 100644
--- a/libmultipath/structs.c
+++ b/libmultipath/structs.c
@@ -150,6 +150,7 @@ uninitialize_path(struct path *pp)
        pp->uid_attribute = NULL;
        pp->checker_timeout = 0;
        pp->pending_ticks = 0;
+       pp->pgindex = 0;
 
        if (checker_selected(&pp->checker))
                checker_put(&pp->checker);
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index 75b6d5b..434b57c 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -373,7 +373,6 @@ void orphan_path(struct path *pp, const char *reason)
 {
        condlog(3, "%s: orphan path, %s", pp->dev, reason);
        pp->mpp = NULL;
-       pp->pgindex = 0;
        uninitialize_path(pp);
 }
 
-- 
2.52.0


Reply via email to