]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: mas_data_end() JIT setting of vars
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 11 Dec 2020 02:32:21 +0000 (21:32 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:33:38 +0000 (12:33 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index c9ff930e93dcad28e4ad71c411fbfafce9be5e00..158f9cdc66a8f875e05fd13713253496584ae1a9 100644 (file)
@@ -1033,13 +1033,16 @@ done:
  */
 static inline unsigned char mas_data_end(struct ma_state *mas)
 {
-       enum maple_type type = mte_node_type(mas->node);
-       unsigned char offset = mt_min_slots[type];
-       unsigned long *pivots = ma_pivots(mas_mn(mas), type);
+       enum maple_type type;
+       unsigned char offset;
+       unsigned long *pivots;
 
+       type = mte_node_type(mas->node);
        if (type == maple_arange_64)
                return ma_meta_end(mte_to_node(mas->node), type);
 
+       offset = mt_min_slots[type];
+       pivots = ma_pivots(mas_mn(mas), type);
        if (unlikely(!pivots[offset]))
                goto decrement;