linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Vlastimil Babka <vbabka@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@gentwo.org>,
	David Rientjes <rientjes@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Harry Yoo <harry.yoo@oracle.com>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Brendan Jackman <jackmanb@google.com>, Zi Yan <ziy@nvidia.com>,
	Eric Biggers <ebiggers@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 09/11] mempool: remove mempool_{init,create}_kvmalloc_pool
Date: Thu, 13 Nov 2025 09:39:50 +0100	[thread overview]
Message-ID: <20251113084022.1255121-10-hch@lst.de> (raw)
In-Reply-To: <20251113084022.1255121-1-hch@lst.de>

This was added for bcachefs and is unused now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/mempool.h | 13 -------------
 mm/mempool.c            | 13 -------------
 2 files changed, 26 deletions(-)

diff --git a/include/linux/mempool.h b/include/linux/mempool.h
index e914fec0e119..d9332485e8ca 100644
--- a/include/linux/mempool.h
+++ b/include/linux/mempool.h
@@ -103,19 +103,6 @@ void mempool_kfree(void *element, void *pool_data);
 	mempool_create((_min_nr), mempool_kmalloc, mempool_kfree,	\
 		       (void *)(unsigned long)(_size))
 
-void *mempool_kvmalloc(gfp_t gfp_mask, void *pool_data);
-void mempool_kvfree(void *element, void *pool_data);
-
-static inline int mempool_init_kvmalloc_pool(mempool_t *pool, int min_nr, size_t size)
-{
-	return mempool_init(pool, min_nr, mempool_kvmalloc, mempool_kvfree, (void *) size);
-}
-
-static inline mempool_t *mempool_create_kvmalloc_pool(int min_nr, size_t size)
-{
-	return mempool_create(min_nr, mempool_kvmalloc, mempool_kvfree, (void *) size);
-}
-
 /*
  * A mempool_alloc_t and mempool_free_t for a simple page allocator that
  * allocates pages of the order specified by pool_data
diff --git a/mm/mempool.c b/mm/mempool.c
index ea2f4f9bcfa1..72c788888ed7 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -724,19 +724,6 @@ void mempool_kfree(void *element, void *pool_data)
 }
 EXPORT_SYMBOL(mempool_kfree);
 
-void *mempool_kvmalloc(gfp_t gfp_mask, void *pool_data)
-{
-	size_t size = (size_t)pool_data;
-	return kvmalloc(size, gfp_mask);
-}
-EXPORT_SYMBOL(mempool_kvmalloc);
-
-void mempool_kvfree(void *element, void *pool_data)
-{
-	kvfree(element);
-}
-EXPORT_SYMBOL(mempool_kvfree);
-
 /*
  * A simple mempool-backed page allocator that allocates pages
  * of the order specified by pool_data.
-- 
2.47.3



  parent reply	other threads:[~2025-11-13  8:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13  8:39 mempool_alloc_bulk and various mempool improvements v3 Christoph Hellwig
2025-11-13  8:39 ` [PATCH 01/11] fault-inject: make enum fault_flags available unconditionally Christoph Hellwig
2025-11-13  8:39 ` [PATCH 02/11] mm: improve kerneldoc comments for __alloc_pages_bulk Christoph Hellwig
2025-11-13  8:39 ` [PATCH 03/11] mempool: improve kerneldoc comments Christoph Hellwig
2025-11-13  8:39 ` [PATCH 04/11] mempool: add error injection support Christoph Hellwig
2025-11-13  8:39 ` [PATCH 05/11] mempool: factor out a mempool_adjust_gfp helper Christoph Hellwig
2025-11-13  8:39 ` [PATCH 06/11] mempool: factor out a mempool_alloc_from_pool helper Christoph Hellwig
2025-11-23  3:42   ` Hugh Dickins
2025-11-23 11:34     ` Vlastimil Babka
2025-11-23 17:49       ` Hugh Dickins
2025-11-23 21:22         ` Vlastimil Babka
2025-11-23 23:04           ` Hugh Dickins
2025-11-25 11:32             ` Vlastimil Babka
2025-11-24  6:17         ` Christoph Hellwig
2025-11-24  6:15       ` Christoph Hellwig
2025-11-25 11:34         ` Vlastimil Babka
2025-11-24  6:14     ` Christoph Hellwig
2025-11-13  8:39 ` [PATCH 07/11] mempool: add mempool_{alloc,free}_bulk Christoph Hellwig
2025-11-13  8:39 ` [PATCH 08/11] mempool: legitimize the io_schedule_timeout in mempool_alloc_from_pool Christoph Hellwig
2025-11-13  8:39 ` Christoph Hellwig [this message]
2025-11-13  8:39 ` [PATCH 10/11] mempool: de-typedef Christoph Hellwig
2025-11-13  8:39 ` [PATCH 11/11] mempool: drop the file name in the top of file comment Christoph Hellwig
2025-11-13 16:12 ` mempool_alloc_bulk and various mempool improvements v3 Vlastimil Babka

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=20251113084022.1255121-10-hch@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=ebiggers@kernel.org \
    --cc=harry.yoo@oracle.com \
    --cc=jackmanb@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=ziy@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox