]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Correct encoding maple nodes
authorMatthew Wilcox <willy@infradead.org>
Tue, 27 Nov 2018 22:03:59 +0000 (17:03 -0500)
committerMatthew Wilcox <willy@infradead.org>
Tue, 27 Nov 2018 22:08:07 +0000 (17:08 -0500)
commitd47b8f1c023d29de5807b393a9f232be2f96d886
treeef6cf304bde7c537d2475fb25db0509d278288d0
parent486494aa5f601ef48cc54446b83a1fafa67a2270
maple_tree: Correct encoding maple nodes

Don't shift; we'll lose the top two bits.  Instead just OR in bit 1
to ensure this pointer is seen as a node pointer, and subtract off 2,
just like the XArray does for turning nodes into entries and vice versa.

Also don't return an entry from _maple_new_node(), return a node and let
the caller take care of turning it into an entry, if it needs an entry.

Also don't use GFP_NOWAIT in mtree_init().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
lib/maple_tree.c