From 171c61bc6900264a528109c4625cf470b9b9bd57 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Wed, 30 Oct 2019 14:27:07 -0400 Subject: [PATCH] maple_tree: Convert old ms arguemnt to mas. Change the name of the maple state variable to mas. Signed-off-by: Liam R. Howlett --- lib/maple_tree.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 8df4eae5e686..af014df6908f 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -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 -- 2.50.1