mm/gup: handle cont-PTE hugetlb pages correctly in gup_must_unshare() via GUP-fast
[linux-2.6-microblaze.git] / lib / maple_tree.c
index bfffbb7..4dd73cf 100644 (file)
@@ -3692,7 +3692,8 @@ static inline int mas_root_expand(struct ma_state *mas, void *entry)
        mas->offset = slot;
        pivots[slot] = mas->last;
        if (mas->last != ULONG_MAX)
-               slot++;
+               pivots[++slot] = ULONG_MAX;
+
        mas->depth = 1;
        mas_set_height(mas);
        ma_set_meta(node, maple_leaf_64, 0, slot);