]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Drop deleted/retry/skip logic
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 17 Jul 2020 21:11:41 +0000 (17:11 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:05:29 +0000 (15:05 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index b10e34451b30374e867f560b62b4092571d5cdbe..dfa44dc35bb85c84cdc93d896e34fcf5b9c5ac65 100644 (file)
@@ -2891,12 +2891,8 @@ static inline void *_mas_store(struct ma_state *mas, void *entry, bool overwrite
        else if (ret)
                return content;
 
-       if (!mas_wr_walk(mas, &r_min, &r_max, entry) &&
-           !mas->span_enode) {
-               /* Not a leaf or spanning write. = broken tree. */
-               // FIXME, rebuild?
+       if (!mas_wr_walk(mas, &r_min, &r_max, entry) && !mas->span_enode)
                return NULL;
-       }
 
        if (mas->span_enode) {
                if (!overwrite) {
@@ -2917,8 +2913,6 @@ static inline void *_mas_store(struct ma_state *mas, void *entry, bool overwrite
                goto done;
        }
 
-       /* Expand store of NULL, if necessary */
-
        if (!entry) {
                mas_extend_null(mas, mas);
                slot = mas_get_slot(mas);
@@ -2932,7 +2926,6 @@ static inline void *_mas_store(struct ma_state *mas, void *entry, bool overwrite
        // Check if this is an append operation.
        end = mas_data_end(mas);
        if ((b_node.b_end < slot_cnt) && ((slot > end) || !end)) {
-               // Appending
                if (r_min < mas->index)
                        mte_set_pivot(mas->node, slot++, mas->index - 1);
 
@@ -2959,7 +2952,6 @@ done:
        if (ret > 2)
                return NULL;
 
-
        return content;
 }
 void *mas_store(struct ma_state *mas, void *entry)