From: 10144149 <tang.wenjun3@xxxxxxxxxx> when multipathd is processing add path1 uevent, just then do reconfigure, There may be two path1 in pathvec. Signed-off-by: 10144149 <tang.wenjun3@xxxxxxxxxx> --- multipathd/main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index f5e9a01..126ca2b 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -650,9 +650,8 @@ uev_add_path (struct uevent *uev, struct vectors * vecs) } } } - lock_cleanup_pop(vecs->lock); if (pp) - return ret; + goto out; /* * get path vital state @@ -662,14 +661,14 @@ uev_add_path (struct uevent *uev, struct vectors * vecs) DI_ALL, &pp); put_multipath_config(conf); if (!pp) { - if (ret == PATHINFO_SKIPPED) - return 0; + if (ret == PATHINFO_SKIPPED){ + ret = 0; + goto out; + } condlog(3, "%s: failed to get path info", uev->kernel); - return 1; + ret = 1; + goto out; } - pthread_cleanup_push(cleanup_lock, &vecs->lock); - lock(vecs->lock); - pthread_testcancel(); ret = store_path(vecs->pathvec, pp); if (!ret) { conf = get_multipath_config(); @@ -683,6 +682,7 @@ uev_add_path (struct uevent *uev, struct vectors * vecs) free_path(pp); ret = 1; } +out: lock_cleanup_pop(vecs->lock); return ret; } -- 2.8.1.windows.1 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel