mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 01:02:08 +00:00
maple_tree: index has been checked to be smaller than pivot
Patch series "mas_anode_descend() related cleanup". Some cleanup related to mas_anode_descend(). This patch (of 3): At the beginning of loop, it has checked the range is in lower bounds. Link: https://lkml.kernel.org/r/20241116014805.11547-1-richard.weiyang@gmail.com Link: https://lkml.kernel.org/r/20241116014805.11547-2-richard.weiyang@gmail.com Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
f5b49bcc7d
commit
e9cee72f59
@ -4882,13 +4882,12 @@ static inline bool mas_anode_descend(struct ma_state *mas, unsigned long size)
|
||||
found = true;
|
||||
goto done;
|
||||
}
|
||||
if (mas->index <= pivot) {
|
||||
mas->node = mas_slot(mas, slots, offset);
|
||||
mas->min = min;
|
||||
mas->max = pivot;
|
||||
offset = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
mas->node = mas_slot(mas, slots, offset);
|
||||
mas->min = min;
|
||||
mas->max = pivot;
|
||||
offset = 0;
|
||||
break;
|
||||
}
|
||||
next_slot:
|
||||
min = pivot + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user