<div dir="ltr">Your fix is now merged.<div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 14, 2016 at 2:09 PM,  <span dir="ltr"><<a href="mailto:zhang.kai16@zte.com.cn" target="_blank">zhang.kai16@zte.com.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: "zhang.kai" <<a href="mailto:zhang.kai16@zte.com.cn">zhang.kai16@zte.com.cn</a>><br>
<br>
Problem:<br>
With each iteration of the vector_foreach_slot() loop statement,<br>
some slots couldn't be traversed when a slot is deleted from vector.<br>
<br>
Reasons:<br>
Currently,loop's index 'i' is not decremented correspondingly when a slot is<br>
deleted from vector.Meanwhile, in the vector_foreach_slot() loop, mpp is assigned<br>
from vector newmp directly, so find_slot() could be omitted.<br>
<br>
Signed-off-by: zhang.kai <<a href="mailto:zhang.kai16@zte.com.cn">zhang.kai16@zte.com.cn</a>><br>
---<br>
 libmultipath/configure.c | 6 ++----<br>
 1 file changed, 2 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/libmultipath/configure.c b/libmultipath/configure.c<br>
index a9b9cf0..c06a3df 100644<br>
--- a/libmultipath/configure.c<br>
+++ b/libmultipath/configure.c<br>
@@ -924,16 +924,14 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r<br>
        if (newmp) {<br>
                vector_foreach_slot (newmp, mpp, i) {<br>
                        char alias[WWID_SIZE];<br>
-                       int j;<br>
<br>
                        if (!deadmap(mpp))<br>
                                continue;<br>
<br>
                        strncpy(alias, mpp->alias, WWID_SIZE - 1);<br>
<br>
-                       if ((j = find_slot(newmp, (void *)mpp)) != -1)<br>
-                               vector_del_slot(newmp, j);<br>
-<br>
+                       vector_del_slot(newmp, i);<br>
+                       i--;<br>
                        remove_map(mpp, vecs, 0);<br>
<br>
                        if (dm_flush_map(alias))<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.8.1.windows.1<br>
<br>
--------------------------------------------------------<br>
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s).  If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited.  If you have received this mail in error, please delete it and notify us immediately.<br>
<br>
--<br>
dm-devel mailing list<br>
<a href="mailto:dm-devel@redhat.com">dm-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/dm-devel" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/dm-devel</a><br>
</font></span></blockquote></div><br></div>