maple_tree: rework mas_wr_slot_store() to be cleaner and more efficient.
authorPeng Zhang <zhangpeng.00@bytedance.com>
Wed, 24 May 2023 03:12:45 +0000 (11:12 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 9 Jun 2023 23:25:45 +0000 (16:25 -0700)
commite6d1ffd611affcd58b31047324f511d8e1de2a38
treefe86cb571e8b37bc17404064adbe0ba54e612968
parent2e1da329b424c693662e7e2afa34654989de3fac
maple_tree: rework mas_wr_slot_store() to be cleaner and more efficient.

Get whether the two gaps to be overwritten are empty to avoid calling
mas_update_gap() all the time.  Also clean up the code and add comments.

Link: https://lkml.kernel.org/r/20230524031247.65949-9-zhangpeng.00@bytedance.com
Signed-off-by: Peng Zhang <zhangpeng.00@bytedance.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c