summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLiam R. Howlett (Oracle) <liam@infradead.org>2026-08-21 15:26:22 -0400
committerAndrew Morton <akpm@linux-foundation.org>2026-08-24 18:43:31 -0700
commitf1681380b5f928e147954d87d875f57a25df189c (patch)
treeba3ceea7510485d22161eeef8513569c8d158a2f /include/linux
parent3f06ef1f34a7ee3b77ee03c13a0c50db8fd3c536 (diff)
downloadlinux-f1681380b5f928e147954d87d875f57a25df189c.tar.gz
linux-f1681380b5f928e147954d87d875f57a25df189c.zip
maple_tree: avoid mas_erase() and mtree_erase() failures
Failures to remove entries using the two APIs to erase the entries may result in allocation failures. The failures may go unnoticed and an unexpected entry may remain. Instead, fall back to retrying with GFP_KERNEL | __GFP_NOFAIL so that the entry will be removed. Link: https://lore.kernel.org/20260821192627.4085470-15-liam@infradead.org Signed-off-by: Liam R. Howlett (Oracle) <liam@infradead.org> Cc: Rik van Riel <riel@surriel.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Breno Leitao <leitao@debian.org> Cc: Chris Mason <clm@meta.com> Cc: Chuck Lever <cel@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Joe Perches <joe@perches.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Waiman Long <longman@redhat.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/maple_tree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h
index 14ca9ac775d9..173602e87c14 100644
--- a/include/linux/maple_tree.h
+++ b/include/linux/maple_tree.h
@@ -570,6 +570,8 @@ int mas_alloc_cyclic(struct ma_state *mas, unsigned long *startp,
unsigned long *next, gfp_t gfp);
bool mas_nomem(struct ma_state *mas, gfp_t gfp);
+bool mas_nomem_nofail(struct ma_state *mas, unsigned long index,
+ unsigned long last);
void mas_pause(struct ma_state *mas);
void maple_tree_init(void);
void mas_destroy(struct ma_state *mas);