diff options
author | Jiazi Li <[email protected]> | 2024-06-26 12:06:30 -0400 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-11-06 20:11:13 -0800 |
commit | 5b2100f723bd5c2b5552b27208f3e7d7447910d3 (patch) | |
tree | 1a6a3b691d612a28edc844c5d1db54d5e80b2355 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | f69c2e4dc6840cf93a3370853966657aca9f13c6 (diff) |
maple_tree: fix alloc node fail issue
In the following code, the second call to the mas_node_count will return
-ENOMEM:
mas_node_count(mas, MAPLE_ALLOC_SLOTS + 1);
mas_node_count(mas, MAPLE_ALLOC_SLOTS * 2 + 2);
This is because there may be some full maple_alloc node in current maple
state. Use full maple_alloc node will make max_req equal to 0. And it
leads to mt_alloc_bulk return 0. As a result, mas_node_count set mas.node
to MA_ERROR(-ENOMEM).
Find a non-full maple_alloc node, and if necessary, use this non-full node
in the next while loop.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Jiazi Li <[email protected]>
Signed-off-by: Liam R. Howlett <[email protected]>
Suggested-by: Liam R. Howlett <[email protected]>
Reviewed-by: Wei Yang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions