maple_tree: only root node could be deficient
Each level's rightmost node should have (max == ULONG_MAX). This means current validation skips the right most node on each level. Only the root node may be below the minimum data threshold. Link: https://lkml.kernel.org/r/20241113031616.10530-4-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>
This commit is contained in:
parent
c38279d407
commit
7318f95ba4
1 changed files with 1 additions and 1 deletions
|
@ -7556,7 +7556,7 @@ void mt_validate(struct maple_tree *mt)
|
|||
MAS_WARN_ON(&mas, mte_dead_node(mas.node));
|
||||
end = mas_data_end(&mas);
|
||||
if (MAS_WARN_ON(&mas, (end < mt_min_slot_count(mas.node)) &&
|
||||
(mas.max != ULONG_MAX))) {
|
||||
(!mte_is_root(mas.node)))) {
|
||||
pr_err("Invalid size %u of " PTR_FMT "\n",
|
||||
end, mas_mn(&mas));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue