Commit c61b3a2b authored by Liam Howlett's avatar Liam Howlett Committed by Andrew Morton
Browse files

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: default avatarLiam R. Howlett <Liam.Howlett@oracle.com>
Suggested-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent f0c4d9fc
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1209,7 +1209,6 @@ static inline void mas_push_node(struct ma_state *mas, struct maple_node *used)
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;