]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Fix maple_big_node struct gap calc.
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Sun, 20 Feb 2022 15:35:28 +0000 (10:35 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 8 Mar 2022 18:19:14 +0000 (13:19 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c

index 9588c6d1d0c8d00808984023d9f920e90841ddeb..5132495f86a660957394dabd79f985b295b430dc 100644 (file)
@@ -106,6 +106,7 @@ static const unsigned char mt_min_slots[] = {
 #define mt_min_slot_count(x) mt_min_slots[mte_node_type(x)]
 
 #define MAPLE_BIG_NODE_SLOTS   (MAPLE_RANGE64_SLOTS * 2 + 2)
+#define MAPLE_BIG_NODE_GAPS    (MAPLE_ARANGE64_SLOTS * 2 + 1)
 
 struct maple_big_node {
        struct maple_pnode *parent;
@@ -113,8 +114,8 @@ struct maple_big_node {
        union {
                struct maple_enode *slot[MAPLE_BIG_NODE_SLOTS];
                struct {
-                       unsigned long padding[MAPLE_BIG_NODE_SLOTS/2 + 2];
-                       unsigned long gap[MAPLE_BIG_NODE_SLOTS/2 + 2];
+                       unsigned long padding[MAPLE_BIG_NODE_GAPS];
+                       unsigned long gap[MAPLE_BIG_NODE_GAPS];
                };
        };
        unsigned long min;