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: add copy_tree_location() helper

Extract the copying of the tree location from one maple state to another
into its own function. This is used more later.

Link: https://lkml.kernel.org/r/20260130205935.2559335-25-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
0abff208 ebfee00c

+12 -6
+12 -6
lib/maple_tree.c
··· 3531 3531 return true; 3532 3532 } 3533 3533 3534 + static inline 3535 + void copy_tree_location(const struct ma_state *src, struct ma_state *dst) 3536 + { 3537 + dst->node = src->node; 3538 + dst->offset = src->offset; 3539 + dst->min = src->min; 3540 + dst->max = src->max; 3541 + dst->end = src->end; 3542 + dst->depth = src->depth; 3543 + } 3544 + 3534 3545 /* 3535 3546 * rebalance_ascend() - Ascend the tree and set up for the next loop - if 3536 3547 * necessary ··· 3581 3570 } 3582 3571 3583 3572 cp->height++; 3584 - mas->node = parent->node; 3585 - mas->offset = parent->offset; 3586 - mas->min = parent->min; 3587 - mas->max = parent->max; 3588 - mas->end = parent->end; 3589 - mas->depth = parent->depth; 3573 + copy_tree_location(parent, mas); 3590 3574 wr_mas_setup(wr_mas, mas); 3591 3575 return true; 3592 3576 }