maple_tree: remove pointer to pointer use in mas_alloc_nodes()

There is a more direct and cleaner way of implementing the same functional
code.  Remove the confusing and unnecessary use of pointers here.

Link: https://lkml.kernel.org/r/20221026151241.4031117-1-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Liam Howlett 2022-10-26 15:13:29 +00:00 committed by Andrew Morton
parent f0c4d9fc9c
commit c61b3a2b2d
1 changed files with 1 additions and 3 deletions

View File

@ -1209,7 +1209,6 @@ done:
static inline void mas_alloc_nodes(struct ma_state *mas, gfp_t gfp)
{
struct maple_alloc *node;
struct maple_alloc **nodep = &mas->alloc;
unsigned long allocated = mas_allocated(mas);
unsigned long success = allocated;
unsigned int requested = mas_alloc_req(mas);
@ -1263,8 +1262,7 @@ static inline void mas_alloc_nodes(struct ma_state *mas, gfp_t gfp)
node->node_count--;
success += count;
nodep = &node->slot[0];
node = *nodep;
node = node->slot[0];
requested -= count;
}
mas->alloc->total = success;