Skip to contentSkip to conversation

maple_tree-introduce-__mas_set_range.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Aug 11, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: maple_tree: introduce __mas_set_range()
has been removed from the -mm tree. Its filename was
maple_tree-introduce-__mas_set_range.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: "Liam R. Howlett" <[email protected]>
Subject: maple_tree: introduce __mas_set_range()
Date: Mon, 24 Jul 2023 14:31:47 -0400

mas_set_range() resets the node to MAS_START, which will cause a re-walk of the tree to the range. This is unnecessary when the maple state is already at the correct location of the write. Add a function that only sets the range to avoid unnecessary re-walking of the tree.

---

 include/linux/maple_tree.h |   21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
include/linux/maple_tree.h renamed from include/linux/maple_tree.h~maple_tree-introduce-__mas_set_range +18 -3
@@ -539,6 +539,22 @@ static inline void mas_reset(struct ma_s
  */
 #define mas_for_each(__mas, __entry, __max) \
 	while (((__entry) = mas_find((__mas), (__max))) != NULL)
+/**
+ * __mas_set_range() - Set up Maple Tree operation state to a sub-range of the
+ * current location.
+ * @mas: Maple Tree operation state.
+ * @start: New start of range in the Maple Tree.
+ * @last: New end of range in the Maple Tree.
+ *
+ * set the internal maple state values to a sub-range.
+ * Please use mas_set_range() if you do not know where you are in the tree.
+ */
+static inline void __mas_set_range(struct ma_state *mas, unsigned long start,
+		unsigned long last)
+{
+	mas->index = start;
+	mas->last = last;
+}
 
 /**
  * mas_set_range() - Set up Maple Tree operation state for a different index.
@@ -553,9 +569,8 @@ static inline void mas_reset(struct ma_s
 static inline
 void mas_set_range(struct ma_state *mas, unsigned long start, unsigned long last)
 {
-	       mas->index = start;
-	       mas->last = last;
-	       mas->node = MAS_START;
+	__mas_set_range(mas, start, last);
+	mas->node = MAS_START;
 }
 
 /**

_

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

maple_tree-add-hex-output-to-maple_arange64-dump.patch maple_tree-reorder-replacement-of-nodes-to-avoid-live-lock.patch maple_tree-introduce-mas_put_in_tree.patch maple_tree-introduce-mas_tree_parent-definition.patch maple_tree-change-mas_adopt_children-parent-usage.patch maple_tree-replace-data-before-marking-dead-in-split-and-spanning-store.patch