diff options
author | Wei Yang <richard.weiyang@gmail.com> | 2024-11-25 03:41:56 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-01-14 07:40:30 +0100 |
commit | 002ebb925e2fcf150b0e346a960060ea4789ff01 (patch) | |
tree | 344f221dfddd0a15b5a6e5531e14fff8f33d0ac2 | |
parent | fs/proc: fix softlockup in __read_vmcore (part 2) (diff) | |
download | linux-002ebb925e2fcf150b0e346a960060ea4789ff01.tar.xz linux-002ebb925e2fcf150b0e346a960060ea4789ff01.zip |
maple_tree: use mas_next_slot() directly
The loop condition makes sure (mas.last < max), so we can directly use
mas_next_slot() here.
Since no other use of mas_next_entry(), it is removed.
Link: https://lkml.kernel.org/r/20241125024156.26093-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | lib/maple_tree.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 047397136f15..36e603645a30 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4746,29 +4746,6 @@ again: } /* - * mas_next_entry() - Internal function to get the next entry. - * @mas: The maple state - * @limit: The maximum range start. - * - * Set the @mas->node to the next entry and the range_start to - * the beginning value for the entry. Does not check beyond @limit. - * Sets @mas->index and @mas->last to the range, Does not update @mas->index and - * @mas->last on overflow. - * Restarts on dead nodes. - * - * Return: the next entry or %NULL. - */ -static inline void *mas_next_entry(struct ma_state *mas, unsigned long limit) -{ - if (mas->last >= limit) { - mas->status = ma_overflow; - return NULL; - } - - return mas_next_slot(mas, limit, false); -} - -/* * mas_rev_awalk() - Internal function. Reverse allocation walk. Find the * highest gap address of a given size in a given node and descend. * @mas: The maple state @@ -6938,7 +6915,7 @@ retry: goto unlock; while (mas_is_active(&mas) && (mas.last < max)) { - entry = mas_next_entry(&mas, max); + entry = mas_next_slot(&mas, max, false); if (likely(entry && !xa_is_zero(entry))) break; } |