maple_tree: Drop mte_get_slot(), _mte_get_slot(), ma_get_slot() and use
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 8 Sep 2020 17:40:10 +0000 (13:40 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:11:25 +0000 (15:11 -0400)
mas_get_slots most places.

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

index dcb0f2db16153502419b16bbee451c3f635a9854..18e38eae0085e3056e2eb2fee7c63c808f2f0942 100644 (file)
@@ -583,33 +583,13 @@ static inline void __rcu **ma_get_slots(struct maple_node *mn,
        }
 }
 
-static inline struct maple_enode *ma_get_slot(
-               struct maple_node *mn, unsigned char offset,
-               enum maple_type type, struct maple_tree *mtree)
-{
-       void **slots = ma_get_slots(mn, type);
-
-       return rcu_dereference_check(slots[offset],
-                               lockdep_is_held(&mtree->ma_lock));
-}
-
-static inline struct maple_enode *_mte_get_slot(
-               struct maple_enode *mn, unsigned char slot,
-               enum maple_type type, struct maple_tree *mtree)
-{
-       return ma_get_slot(mte_to_node(mn), slot, type, mtree);
-}
-
-static inline struct maple_enode *mte_get_slot(struct maple_enode *mn,
-                unsigned char slot, struct maple_tree *mtree)
-{
-       return _mte_get_slot(mn, slot, mte_node_type(mn), mtree);
-}
-
 static inline struct maple_enode *mas_get_slot(struct ma_state *mas,
-               unsigned char slot)
+               unsigned char offset)
 {
-       return mte_get_slot(mas->node, slot, mas->tree);
+       void **slots = ma_get_slots(mte_to_node(mas->node),
+                                   mte_node_type(mas->node));
+       return rcu_dereference_check(slots[offset],
+                               lockdep_is_held(mas->tree->ma_lock));
 }
 
 /*