[dm-devel] [PATCH] multipath: check setup_multipath return value.
Benjamin Marzinski
bmarzins at redhat.com
Wed Jul 13 18:30:42 UTC 2011
When setup_multipath() fails, it removes the map. So update_path_groups()
needs check the return value, and fail without touching the map anymore if
setup_multipath() fails.
Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
---
multipathd/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: multipath-tools-110713/multipathd/main.c
===================================================================
--- multipath-tools-110713.orig/multipathd/main.c
+++ multipath-tools-110713/multipathd/main.c
@@ -1060,7 +1060,8 @@ int update_path_groups(struct multipath
return 1;
}
dm_lib_release();
- setup_multipath(vecs, mpp);
+ if (setup_multipath(vecs, mpp) != 0)
+ return 1;
sync_map_state(mpp);
return 0;
More information about the dm-devel
mailing list