diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2011-07-13 13:30:42 -0500 |
---|---|---|
committer | Christophe Varoqui <christophe.varoqui@opensvc.com> | 2011-09-01 08:58:32 +0200 |
commit | f4b3137176beaacc0084284d1f3d573610123994 (patch) | |
tree | eba549657ba04534ee013fca29b864a90b66ef30 | |
parent | 735f2992398d4179601f3d7043fad606c90171d4 (diff) | |
download | multipath-tools-f4b3137176beaacc0084284d1f3d573610123994.tar.gz |
multipath: check setup_multipath return value.
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@redhat.com>
-rw-r--r-- | multipathd/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/multipathd/main.c b/multipathd/main.c index be236cb..68ce749 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1060,7 +1060,8 @@ int update_path_groups(struct multipath *mpp, struct vectors *vecs, int refresh) return 1; } dm_lib_release(); - setup_multipath(vecs, mpp); + if (setup_multipath(vecs, mpp) != 0) + return 1; sync_map_state(mpp); return 0; |