Skip to contentSkip to conversation

libmultipath: Fix logic in should_multipath

PATCH In review Martin Wilck 2 participants 2 messages Apr 13, 2018 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libmultipath: Fix logic in should_multipath

Commit d3b71498 missed a negation.

Fixes d3b71498 "multipath: fix rcu thread cancellation hang"
---
 libmultipath/wwids.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libmultipath/wwids.c +1 -1
index 0ec9f25b..8c21b33f 100644
@@ -284,7 +284,7 @@ should_multipath(struct path *pp1, vector pathvec)
 	ignore_new_devs = conf->ignore_new_devs;
 	find_multipaths = conf->find_multipaths;
 	put_multipath_config(conf);
-	if (find_multipaths && !ignore_new_devs)
+	if (!find_multipaths && !ignore_new_devs)
 		return 1;
 
 	condlog(4, "checking if %s should be multipathed", pp1->dev);
Signature · 1 line
2.16.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Martin Wilck

Commit d3b71498 missed a negation.

Oops. Thanks for the catch.

Quoted 22 lines
Fixes d3b71498 "multipath: fix rcu thread cancellation hang"
---
 libmultipath/wwids.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libmultipath/wwids.c +1 -1
index 0ec9f25b..8c21b33f 100644
@@ -284,7 +284,7 @@ should_multipath(struct path *pp1, vector pathvec)
 	ignore_new_devs = conf->ignore_new_devs;
 	find_multipaths = conf->find_multipaths;
 	put_multipath_config(conf);
-	if (find_multipaths && !ignore_new_devs)
+	if (!find_multipaths && !ignore_new_devs)
 		return 1;
 
 	condlog(4, "checking if %s should be multipathed", pp1->dev);
Signature · 1 line
2.16.1