]> Gentwo Git Trees - linux/.git/commit
mempool: factor out a mempool_alloc_from_pool helper
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Nov 2025 08:39:47 +0000 (09:39 +0100)
committerVlastimil Babka <vbabka@suse.cz>
Sun, 23 Nov 2025 11:28:16 +0000 (12:28 +0100)
commit1742d97df628de55c0df1a0eb6eefb27136ee890
tree112e012382673685e5b7d99ce21f4f7795549565
parent3d2492401d3cdb8e9e1276c3af5f1cd0c8a2b076
mempool: factor out a mempool_alloc_from_pool helper

Add a helper for the mempool_alloc slowpath to better separate it from the
fast path, and also use it to implement mempool_alloc_preallocated which
shares the same logic.

[hughd@google.com: fix lack of retrying with __GFP_DIRECT_RECLAIM]
[vbabka@suse.cz: really use limited flags for first mempool attempt]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20251113084022.1255121-7-hch@lst.de
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/mempool.c