]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Fix return of the allocated node mask.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 10 Dec 2018 17:20:09 +0000 (12:20 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 10 Dec 2018 17:20:09 +0000 (12:20 -0500)
0x03 is the correct mask for 8 byte aligned memory.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index 57c0b554f6d1b0c7fd3892d36e23622cc762c5ad..961929cb05a25b8e95fef3ecef67eceb235c9852 100644 (file)
@@ -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)
 {