Skip to contentSkip to conversation

maple_tree-not-possible-to-be-a-root-node-after-loop.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 14, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: maple_tree: not possible to be a root node after loop
has been removed from the -mm tree. Its filename was
maple_tree-not-possible-to-be-a-root-node-after-loop.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Wei Yang <[email protected]>
Subject: maple_tree: not possible to be a root node after loop
Date: Sat, 16 Nov 2024 01:48:04 +0000

Empty tree and single entry tree is handled else whether, so the maple tree here must be a tree with nodes.

If the height is 1 and we found the gap, it will jump to *done* since it is also a leaf.

If the height is more than one, and there may be an available range, we will descend the tree, which is not root anymore.

If there is no available range, we will set error and return.

This means the check for root node here is not necessary.

---

 lib/maple_tree.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
lib/maple_tree.c renamed from lib/maple_tree.c~maple_tree-not-possible-to-be-a-root-node-after-loop +1 -4
@@ -4880,7 +4880,7 @@ static inline bool mas_anode_descend(str
 		if (gap >= size) {
 			if (ma_is_leaf(type)) {
 				found = true;
-				goto done;
+				break;
 			}
 
 			mas->node = mas_slot(mas, slots, offset);
@@ -4897,9 +4897,6 @@ next_slot:
 		}
 	}
 
-	if (mte_is_root(mas->node))
-		found = true;
-done:
 	mas->offset = offset;
 	return found;
 }

_

Patches currently in -mm which might be from [email protected] are