From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <martin.wilck@suse.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>,
dm-devel@lists.linux.dev, Martin Wilck <mwilck@suse.com>
Subject: Re: [PATCH v2 16/26] libmultipath: remove cleanup_multipath_and_paths()
Date: Fri, 19 Dec 2025 23:26:02 -0500 [thread overview]
Message-ID: <aUYlWsyMZyJ9peTj@redhat.com> (raw)
In-Reply-To: <20251219144108.237928-17-mwilck@suse.com>
On Fri, Dec 19, 2025 at 03:40:58PM +0100, Martin Wilck wrote:
> This function is not used any more.
>
> Suggested-by: Benjamin Marzinski <bmarzins@redhat.com>
> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
> libmultipath/libmultipath.version | 1 -
> libmultipath/structs.c | 6 ------
> libmultipath/structs.h | 1 -
> 3 files changed, 8 deletions(-)
>
> diff --git a/libmultipath/libmultipath.version b/libmultipath/libmultipath.version
> index 366b829..39384d6 100644
> --- a/libmultipath/libmultipath.version
> +++ b/libmultipath/libmultipath.version
> @@ -69,7 +69,6 @@ global:
> cleanup_bindings;
> cleanup_lock;
> cleanup_multipath;
> - cleanup_multipath_and_paths;
> cleanup_pathvec_and_free_paths;
> cleanup_udev_device_ptr;
> cleanup_udev_enumerate_ptr;
> diff --git a/libmultipath/structs.c b/libmultipath/structs.c
> index 9e1734d..868c3d6 100644
> --- a/libmultipath/structs.c
> +++ b/libmultipath/structs.c
> @@ -324,12 +324,6 @@ void cleanup_multipath(struct multipath **pmpp)
> free_multipath(*pmpp);
> }
>
> -void cleanup_multipath_and_paths(struct multipath **pmpp)
> -{
> - if (*pmpp)
> - free_multipath(*pmpp);
> -}
> -
Like I said in 14/26, I think we want to keep this to clean up
add_map_without_path(). It should loop through the paths in (*pmpp)->pg,
orphaning them, before calling free_multipath().
-Ben
> void free_multipathvec(vector mpvec)
> {
> int i;
> diff --git a/libmultipath/structs.h b/libmultipath/structs.h
> index a637af7..251e672 100644
> --- a/libmultipath/structs.h
> +++ b/libmultipath/structs.h
> @@ -582,7 +582,6 @@ void free_pathgroup(struct pathgroup *pgp);
> void free_pgvec(vector pgvec);
> void free_multipath(struct multipath *mpp);
> void cleanup_multipath(struct multipath **pmpp);
> -void cleanup_multipath_and_paths(struct multipath **pmpp);
> void free_multipath_attributes(struct multipath *);
> void free_multipathvec(vector mpvec);
>
> --
> 2.52.0
next prev parent reply other threads:[~2025-12-20 4:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 14:40 [PATCH v2 00/26] Multipath-tools: various bug fixes Martin Wilck
2025-12-19 14:40 ` [PATCH v2 01/26] libmultipath: drop drop_multipath Martin Wilck
2025-12-19 14:40 ` [PATCH v2 02/26] libmultipath: don't access path members in free_pgvec() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 03/26] libmpathutil: constify find_slot() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 04/26] libmultipath: don't touch mpvec in remove_map() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 05/26] libmultipath: export orphan_paths() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 06/26] libmultipath: export cleanup_multipath() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 07/26] libmultipath: add cleanup_pathvec_and_free_paths() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 08/26] libmultipath: don't free paths in orphan_paths() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 09/26] multipathd: free orphaned paths in checker_finished() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 10/26] libmultipath: remove free_paths argument from free_pathgroup() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 11/26] libmultipath: remove free_paths argument from free_pgvec() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 12/26] libmultipath: remove free_paths argument from free_multipathvec() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 13/26] multipath: free paths through pathvec in check_usable_paths() Martin Wilck
2025-12-20 4:19 ` Benjamin Marzinski
2026-01-05 14:38 ` Martin Wilck
2025-12-19 14:40 ` [PATCH v2 14/26] multipathd: add_map_without_path(): orphan paths instead of freeing them Martin Wilck
2025-12-19 14:46 ` Martin Wilck
2025-12-20 4:23 ` Benjamin Marzinski
2026-01-05 15:15 ` Martin Wilck
2026-01-05 23:17 ` Benjamin Marzinski
2026-01-06 10:31 ` Martin Wilck
2025-12-19 14:40 ` [PATCH v2 15/26] libmultipath: remove free_paths argument from free_multipath() Martin Wilck
2025-12-19 14:40 ` [PATCH v2 16/26] libmultipath: remove cleanup_multipath_and_paths() Martin Wilck
2025-12-20 4:26 ` Benjamin Marzinski [this message]
2025-12-19 14:40 ` [PATCH v2 17/26] libmultipaths: annotate functions that may free paths Martin Wilck
2025-12-20 4:35 ` Benjamin Marzinski
2025-12-19 14:41 ` [PATCH v2 18/26] multipath-tools: Fix ISO C23 errors with strchr() Martin Wilck
2025-12-19 14:41 ` [PATCH v2 19/26] libmultipath: simplify sysfs_get_target_nodename() Martin Wilck
2025-12-19 14:41 ` [PATCH v2 20/26] multipathd: join the init_unwinder dummy thread Martin Wilck
2025-12-19 14:41 ` [PATCH v2 21/26] kpartx: fix some memory leaks Martin Wilck
2025-12-19 14:41 ` [PATCH v2 22/26] libmpathutil: use union for bitfield Martin Wilck
2025-12-19 14:41 ` [PATCH v2 23/26] libmpathutil: add wrapper code for libudev Martin Wilck
2025-12-19 14:41 ` [PATCH v2 24/26] multipath-tools: use the libudev wrapper functions Martin Wilck
2025-12-19 14:41 ` [PATCH v2 25/26] Makefile: add functionality to determine cmocka version Martin Wilck
2025-12-19 14:41 ` [PATCH v2 26/26] multipath-tools tests: adaptations for cmocka 2.0 Martin Wilck
2025-12-20 4:41 ` [PATCH v2 00/26] Multipath-tools: various bug fixes Benjamin Marzinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aUYlWsyMZyJ9peTj@redhat.com \
--to=bmarzins@redhat.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@lists.linux.dev \
--cc=martin.wilck@suse.com \
--cc=mwilck@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.