]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Convert old ms arguemnt to mas.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 30 Oct 2019 18:27:07 +0000 (14:27 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 18:56:36 +0000 (14:56 -0400)
Change the name of the maple state variable to mas.

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

index 8df4eae5e6868af3f9366812565c598513cfde26..af014df6908f58edf39b03e52b3eee2e1ae0b60c 100644 (file)
@@ -918,41 +918,41 @@ static inline void ma_free_alloc(struct maple_node *node)
  * Check if there was an error allocating and do the allocation if necessary
  * If there are allocations, then free them.
  */
-bool mas_nomem(struct ma_state *ms, gfp_t gfp)
-       __must_hold(ms->tree->lock)
+bool mas_nomem(struct ma_state *mas, gfp_t gfp)
+       __must_hold(mas->tree->lock)
 {
-       if (ms->node != MA_ERROR(-ENOMEM)) {
-               struct maple_node *node = mas_get_alloc(ms);
+       if (mas->node != MA_ERROR(-ENOMEM)) {
+               struct maple_node *node = mas_get_alloc(mas);
 
                if (node)
                        ma_free_alloc(node);
-               ms->alloc = NULL;
+               mas->alloc = NULL;
                return false;
        }
 
        if (gfpflags_allow_blocking(gfp)) {
-               mtree_unlock(ms->tree);
-               mas_node_node(ms, gfp);
-               mtree_lock(ms->tree);
+               mtree_unlock(mas->tree);
+               mas_node_node(mas, gfp);
+               mtree_lock(mas->tree);
        } else {
-               mas_node_node(ms, gfp);
+               mas_node_node(mas, gfp);
        }
-       if (!mas_get_alloc(ms))
+       if (!mas_get_alloc(mas))
                return false;
-       ms->node = MAS_START;
+       mas->node = MAS_START;
        return true;
 }
-static inline struct maple_node *mas_node_cnt(struct ma_state *ms, int count)
+static inline struct maple_node *mas_node_cnt(struct ma_state *mas, int count)
 {
-       int allocated = mas_get_alloc_cnt(ms);
+       int allocated = mas_get_alloc_cnt(mas);
 
        BUG_ON(count > 127);
 
        if (allocated < count) {
-               mas_set_alloc_req(ms, count - allocated);
-               mas_node_node(ms, GFP_NOWAIT | __GFP_NOWARN);
+               mas_set_alloc_req(mas, count - allocated);
+               mas_node_node(mas, GFP_NOWAIT | __GFP_NOWARN);
        }
-       return ms->alloc;
+       return mas->alloc;
 }
 
 /** Private