From 1b2193865f2de09df16cb6066bd43a65804206d4 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Thu, 31 Jan 2019 19:28:10 -0500 Subject: [PATCH] maple_tree: Change mask calc for mt_parent_type Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index b891d8a89a5f..7625fcd967b5 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -169,7 +169,7 @@ static inline enum maple_type mt_parent_type(struct maple_node *node) unsigned long parent = (unsigned long) mt_to_node(node)->parent; unsigned long slot_shift = mt_parent_shift(parent); - parent &= ~(ULONG_MAX << slot_shift); + parent &= (1 << (slot_shift + 1)) - 1; switch (parent) { case 6: return maple_range_64; -- 2.50.1