]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: refine ma_state init from mas_start()
authorVernon Yang <vernon2gm@gmail.com>
Wed, 21 Dec 2022 06:00:57 +0000 (14:00 +0800)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 23 Mar 2023 15:54:00 +0000 (11:54 -0400)
commit70b0583be706d7b3f2e19bde980df6ce000c4acf
tree5ee1fa9b3a0db7c032aaa2e1d35bd763f2ffbf63
parent922d791fc5bdd197da1b33657710c574878513c8
maple_tree: refine ma_state init from mas_start()

If mas->node is an MAS_START, there are three cases, and they all assign
different values to mas->node and mas->offset.  So there is no need to set
them to a default value before updating.

Update them directly to make them easier to understand and for better
readability.

Link: https://lkml.kernel.org/r/20221221060058.609003-7-vernon2gm@gmail.com
Cc: <Stable@vger.kernel.org>
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Vernon Yang <vernon2gm@gmail.com>
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c