From: Liam R. Howlett Date: Mon, 10 Dec 2018 17:20:09 +0000 (-0500) Subject: maple_tree: Fix return of the allocated node mask. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f4f2d732972a18a425b1c238bdeeccbfad94e127;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 57c0b554f6d1..961929cb05a2 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) {