]> git.baikalelectronics.ru Git - kernel.git/commit
maple_tree: fix depth tracking in maple_state
authorLiam Howlett <liam.howlett@oracle.com>
Mon, 7 Nov 2022 16:38:35 +0000 (16:38 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 8 Nov 2022 23:57:25 +0000 (15:57 -0800)
commitf8b13822278225bc120d222223f13bcc7e52efa7
tree29d07e9e978c048e12df7e5357b989526b08afe4
parent29752db5417093fd0e9aee148b58b41a85fbdc2d
maple_tree: fix depth tracking in maple_state

It is possible to confuse the depth tracking in the maple state by
searching the same node for values.  Fix the depth tracking by moving
where the depth is incremented closer to where the node changes level.
Also change the initial depth setting when using the root node.

Link: https://lkml.kernel.org/r/20221107163814.866612-1-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c