device-mapper-multipath/0004-multipathd-remove-unneeded-function-parameter.patch

84 lines
2.4 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Thu, 29 Mar 2018 14:01:30 -0500
Subject: [PATCH] multipathd: remove unneeded function parameter
remove_map_and_stop_waiter was always called with purge_vecs = 1, so
it can simply be removed, as suggested by Martin Wilck
Cc: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
multipathd/main.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 9a4f671..841d3e9 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -311,14 +311,13 @@ wait_for_events(struct multipath *mpp, struct vectors *vecs)
}
static void
-remove_map_and_stop_waiter(struct multipath *mpp, struct vectors *vecs,
- int purge_vec)
+remove_map_and_stop_waiter(struct multipath *mpp, struct vectors *vecs)
{
/* devices are automatically removed by the dmevent polling code,
* so they don't need to be manually removed here */
if (!poll_dmevents)
stop_waiter_thread(mpp, vecs);
- remove_map(mpp, vecs, purge_vec);
+ remove_map(mpp, vecs, PURGE_VEC);
}
static void
@@ -400,7 +399,7 @@ int __setup_multipath(struct vectors *vecs, struct multipath *mpp,
return 0;
out:
- remove_map_and_stop_waiter(mpp, vecs, PURGE_VEC);
+ remove_map_and_stop_waiter(mpp, vecs);
return 1;
}
@@ -637,7 +636,7 @@ flush_map(struct multipath * mpp, struct vectors * vecs, int nopaths)
}
orphan_paths(vecs->pathvec, mpp);
- remove_map_and_stop_waiter(mpp, vecs, 1);
+ remove_map_and_stop_waiter(mpp, vecs);
return 0;
}
@@ -769,7 +768,7 @@ uev_remove_map (struct uevent * uev, struct vectors * vecs)
}
orphan_paths(vecs->pathvec, mpp);
- remove_map_and_stop_waiter(mpp, vecs, 1);
+ remove_map_and_stop_waiter(mpp, vecs);
out:
lock_cleanup_pop(vecs->lock);
FREE(alias);
@@ -1154,7 +1153,7 @@ out:
return retval;
fail:
- remove_map_and_stop_waiter(mpp, vecs, 1);
+ remove_map_and_stop_waiter(mpp, vecs);
return 1;
}
@@ -1612,7 +1611,7 @@ mpvec_garbage_collector (struct vectors * vecs)
vector_foreach_slot (vecs->mpvec, mpp, i) {
if (mpp && mpp->alias && !dm_map_present(mpp->alias)) {
condlog(2, "%s: remove dead map", mpp->alias);
- remove_map_and_stop_waiter(mpp, vecs, 1);
+ remove_map_and_stop_waiter(mpp, vecs);
i--;
}
}
--
2.7.4