]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
remove likely and fix whitespace in store
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 12 Oct 2021 15:28:25 +0000 (11:28 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Oct 2021 19:23:10 +0000 (15:23 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c

index cc11db1104fd5fa2cd388e2e9c6947f74f469e19..27058c6b63b3d8c9d21b7f60a59685e454db66ae 100644 (file)
@@ -4003,7 +4003,7 @@ done:
                ma_set_meta(newnode, maple_leaf_64, 0, new_end);
        }
 
-       if (likely(mt_in_rcu(mas->tree))) {
+       if (mt_in_rcu(mas->tree)) {
                mas->node = mt_mk_node(newnode, mt);
                mas_replace(mas, false);
        } else {
@@ -4144,10 +4144,6 @@ static inline void *_mas_store(struct ma_state *mas, void *entry, bool overwrite
        if (mas->last > end_piv)
                end_piv = mas->max;
 
-       // FIXME: Try finding end offset out here and passing it through.
-       // Maybe a struct for writes?
-       // lmax and offset_end ?
-
        if (!entry) {
                /* Check next slot(s) if we are overwriting the end */
                if ((mas->last == end_piv) && !slots[offset_end + 1]) {
@@ -4232,10 +4228,11 @@ static inline void *_mas_store(struct ma_state *mas, void *entry, bool overwrite
                goto slow_path;
 
        if ((offset_end - mas->offset <= 1) &&
-           mas_slot_store(mas, entry, r_min, r_max, end_piv, end, content, mt, slots))
+           mas_slot_store(mas, entry, r_min, r_max, end_piv, end, content, mt,
+                          slots))
                return content;
-       else if (mas_node_store(mas, entry, r_min, r_max, end, content, mt, slots, pivots,
-                               offset_end))
+       else if (mas_node_store(mas, entry, r_min, r_max, end, content, mt,
+                               slots, pivots, offset_end))
                return content;
 
        if (mas_is_err(mas))
@@ -4243,7 +4240,8 @@ static inline void *_mas_store(struct ma_state *mas, void *entry, bool overwrite
 
 slow_path:
        b_node.type = mte_node_type(mas->node);
-       b_node.b_end = mas_store_b_node(mas, &b_node, entry, end, offset_end, content);
+       b_node.b_end = mas_store_b_node(mas, &b_node, entry, end, offset_end,
+                                       content);
        b_node.min = mas->min;
 
        zero = MAPLE_BIG_NODE_SLOTS - b_node.b_end - 1;