Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

maple_tree: don't pass through height in mas_wr_spanning_store

Height is not used locally in the function, so call the height argument
closer to where it is passed in the next level.

Link: https://lkml.kernel.org/r/20260130205935.2559335-9-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Andrew Ballance <andrewjballance@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: SeongJae Park <sj@kernel.org>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Liam R. Howlett and committed by
Andrew Morton
36801595 41bcc348

+4 -5
+4 -5
lib/maple_tree.c
··· 2750 2750 2751 2751 2752 2752 static noinline void mas_wr_spanning_rebalance(struct ma_state *mas, 2753 - struct maple_subtree_state *mast, unsigned char height, 2754 - struct ma_wr_state *wr_mas) 2753 + struct maple_subtree_state *mast, struct ma_wr_state *wr_mas) 2755 2754 { 2756 2755 struct maple_big_node b_node; 2756 + unsigned char height; 2757 2757 MA_STATE(l_mas, mas->tree, mas->index, mas->index); 2758 2758 MA_STATE(r_mas, mas->tree, mas->index, mas->last); 2759 2759 MA_STATE(m_mas, mas->tree, mas->index, mas->index); ··· 2788 2788 unlikely(mast->bn->b_end <= mt_min_slots[mast->bn->type])) 2789 2789 mast_spanning_rebalance(mast); 2790 2790 2791 + height = mas_mt_height(mas) + 1; 2791 2792 mas_spanning_rebalance_loop(mas, mast, height); 2792 2793 } 2793 2794 /* ··· 3449 3448 { 3450 3449 struct maple_subtree_state mast; 3451 3450 struct ma_state *mas; 3452 - unsigned char height; 3453 3451 3454 3452 /* Left and Right side of spanning store */ 3455 3453 MA_STATE(l_mas, NULL, 0, 0); ··· 3476 3476 * Node rebalancing may occur due to this store, so there may be three new 3477 3477 * entries per level plus a new root. 3478 3478 */ 3479 - height = mas_mt_height(mas); 3480 3479 3481 3480 /* 3482 3481 * Set up right side. Need to get to the next offset after the spanning ··· 3508 3509 l_mas = *mas; 3509 3510 mast.orig_l = &l_mas; 3510 3511 mast.orig_r = &r_mas; 3511 - mas_wr_spanning_rebalance(mas, &mast, height + 1, wr_mas); 3512 + mas_wr_spanning_rebalance(mas, &mast, wr_mas); 3512 3513 } 3513 3514 3514 3515 /*