diff options
author | David Hildenbrand <david@redhat.com> | 2024-12-04 13:54:38 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2025-01-27 09:39:16 -0500 |
commit | e29e9acae06dc28ca8dbf3db976e09787e610dc8 (patch) | |
tree | c013a83e3550708307a4190969886818780ed1cb /fs/proc/vmcore.c | |
parent | e017b1f4aa4eb887ee85fe13862206c0d31344b4 (diff) | |
download | linux-e29e9acae06dc28ca8dbf3db976e09787e610dc8.tar.gz linux-e29e9acae06dc28ca8dbf3db976e09787e610dc8.tar.bz2 linux-e29e9acae06dc28ca8dbf3db976e09787e610dc8.zip |
fs/proc/vmcore: factor out freeing a list of vmcore ranges
Let's factor it out into include/linux/crash_dump.h, from where we can
use it also outside of vmcore.c later.
Acked-by: Baoquan He <bhe@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20241204125444.1734652-8-david@redhat.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'fs/proc/vmcore.c')
-rw-r--r-- | fs/proc/vmcore.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 7ad94fa7a2af..6632d4bc4b05 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -1592,14 +1592,7 @@ void vmcore_cleanup(void) proc_vmcore = NULL; } - /* clear the vmcore list. */ - while (!list_empty(&vmcore_list)) { - struct vmcore_range *m; - - m = list_first_entry(&vmcore_list, struct vmcore_range, list); - list_del(&m->list); - kfree(m); - } + vmcore_free_ranges(&vmcore_list); free_elfcorebuf(); /* clear vmcore device dump list */ |