From f7cdfec9ae34ade94c9938115d45b054e2b6dbd6 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Tue, 15 Oct 2019 14:40:48 -0400 Subject: [PATCH] maple_tree: Update mas_start to return the entry on a single pointer tree. mas_start returns: If mas->node is an error or MAS_START, return NULL If it's an empty tree: NULL & mas->node == MAS_NONE If it's a single entry: The entry & mas->node == MAS_ROOT If it's a tree: NULL & mas->node == safe root node. Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index f955ff9d01aa..3f2dc1b1d4f2 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -958,6 +958,7 @@ static inline struct maple_node *mas_node_cnt(struct ma_state *ms, int count) * Sets up maple state for operations by setting mas->min = 0 & mas->node to * certain values. * returns: + * - If mas->node is an error or MAS_START, return NULL. * - If it's an empty tree: NULL & mas->node == MAS_NONE * - If it's a single entry: The entry & mas->node == MAS_ROOT * - If it's a tree: NULL & mas->node == safe root node. -- 2.50.1