[dm-devel] [PATCH 4/7] libmultipath: always set INIT_REMOVED in set_path_removed

Benjamin Marzinski bmarzins at redhat.com
Wed Oct 20 19:15:19 UTC 2021


Avoiding this corner case simplifies a future patch

Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
---
 libmultipath/structs_vec.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index d363e7f6..fb26437a 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -326,10 +326,8 @@ void set_path_removed(struct path *pp)
 	 * Keep link to mpp. It will be removed when the path
 	 * is successfully removed from the map.
 	 */
-	if (!mpp) {
+	if (!mpp)
 		condlog(0, "%s: internal error: mpp == NULL", pp->dev);
-		return;
-	}
 	pp->mpp = mpp;
 	pp->initialized = INIT_REMOVED;
 }
-- 
2.17.2




More information about the dm-devel mailing list