diff mbox series

[v2,06/18] libmultipath: make dm_remove_partmaps() a static function

Message ID 20240103175643.18438-7-bmarzins@redhat.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series change how multipathd deletes maps plus cleanups | expand

Commit Message

Benjamin Marzinski Jan. 3, 2024, 5:56 p.m. UTC
dm_remove_partmaps() is only used in devmapper.c, so make it static. It
does need to be declared early, since remove_partmaps() and it call
eachother.

Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 libmultipath/devmapper.c | 4 +++-
 libmultipath/devmapper.h | 2 --
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index f5b4f4c0..73bb6fe7 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -53,6 +53,8 @@  static int dm_cancel_remove_partmaps(const char * mapname);
 #define __DR_UNUSED__ __attribute__((unused))
 #endif
 
+static int dm_remove_partmaps (const char * mapname, int need_sync,
+			       int deferred_remove);
 static int do_foreach_partmaps(const char * mapname,
 			       int (*partmap_func)(const char *, void *),
 			       void *data);
@@ -1544,7 +1546,7 @@  remove_partmap(const char *name, void *data)
 	return 0;
 }
 
-int
+static int
 dm_remove_partmaps (const char * mapname, int need_sync, int deferred_remove)
 {
 	struct remove_data rd = { need_sync, deferred_remove };
diff --git a/libmultipath/devmapper.h b/libmultipath/devmapper.h
index 9d484dab..3fc8473b 100644
--- a/libmultipath/devmapper.h
+++ b/libmultipath/devmapper.h
@@ -74,8 +74,6 @@  int dm_geteventnr (const char *name);
 int dm_is_suspended(const char *name);
 int dm_get_major_minor (const char *name, int *major, int *minor);
 char * dm_mapname(int major, int minor);
-int dm_remove_partmaps (const char * mapname, int need_sync,
-			int deferred_remove);
 int dm_get_uuid(const char *name, char *uuid, int uuid_len);
 bool has_dm_info(const struct multipath *mpp);
 int dm_get_info (const char * mapname, struct dm_info *dmi);