From f4f2d732972a18a425b1c238bdeeccbfad94e127 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Mon, 10 Dec 2018 12:20:09 -0500 Subject: [PATCH] maple_tree: Fix return of the allocated node mask. 0x03 is the correct mask for 8 byte aligned memory. 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 57c0b554f6d1b..961929cb05a25 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -65,7 +65,7 @@ static inline void *ma_mk_node(const struct maple_node *node) static inline struct maple_node *ma_get_alloc(const struct maple_state *ms) { - return (struct maple_node *)((unsigned long)ms->alloc & ~0x0F); + return (struct maple_node *)((unsigned long)ms->alloc & ~0x03); } static inline int ma_get_alloc_cnt(const struct maple_state *ms) { -- 2.50.1