Commit ec07967
maple_tree: fix get wrong data_end in mtree_lookup_walk()
if (likely(offset > end))
max = pivots[offset];
The above code should be changed to if (likely(offset < end)), which is
correct. This affects the correctness of ma_data_end(). Now it seems
that the final result will not be wrong, but it is best to change it.
This patch does not change the code as above, because it simplifies the
code by the way.
Link: https://lkml.kernel.org/r/20230314124203.91572-1-zhangpeng.00@bytedance.com
Link: https://lkml.kernel.org/r/20230314124203.91572-2-zhangpeng.00@bytedance.com
Fixes: 54a611b ("Maple Tree: add new data structure")
Signed-off-by: Peng Zhang <zhangpeng.00@bytedance.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 6fe7d6b commit ec07967
1 file changed
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3941 | 3941 | | |
3942 | 3942 | | |
3943 | 3943 | | |
3944 | | - | |
3945 | | - | |
3946 | | - | |
3947 | | - | |
3948 | 3944 | | |
3949 | | - | |
3950 | | - | |
3951 | | - | |
3952 | | - | |
3953 | | - | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
3954 | 3950 | | |
3955 | | - | |
3956 | 3951 | | |
3957 | 3952 | | |
3958 | 3953 | | |
| |||
0 commit comments