mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
augmented rbtree: add new RB_DECLARE_CALLBACKS_MAX macro
Add RB_DECLARE_CALLBACKS_MAX, which generates augmented rbtree callbacks for the case where the augmented value is a scalar whose definition follows a max(f(node)) pattern. This actually covers all present uses of RB_DECLARE_CALLBACKS, and saves some (source) code duplication in the various RBCOMPUTE function definitions. [[email protected]: fix mm/vmalloc.c] Link: http://lkml.kernel.org/r/CANN689FXgK13wDYNh1zKxdipeTuALG4eKvKpsdZqKFJ-rvtGiQ@mail.gmail.com [[email protected]: re-add check to check_augmented()] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Michel Lespinasse <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: David Howells <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: Uladzislau Rezki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
444b8a83f1
commit
315cc066b8
8 changed files with 115 additions and 98 deletions
|
|
@ -396,9 +396,8 @@ compute_subtree_max_size(struct vmap_area *va)
|
|||
get_subtree_max_size(va->rb_node.rb_right));
|
||||
}
|
||||
|
||||
RB_DECLARE_CALLBACKS(static, free_vmap_area_rb_augment_cb,
|
||||
struct vmap_area, rb_node, unsigned long, subtree_max_size,
|
||||
compute_subtree_max_size)
|
||||
RB_DECLARE_CALLBACKS_MAX(static, free_vmap_area_rb_augment_cb,
|
||||
struct vmap_area, rb_node, unsigned long, subtree_max_size, va_size)
|
||||
|
||||
static void purge_vmap_area_lazy(void);
|
||||
static BLOCKING_NOTIFIER_HEAD(vmap_notify_list);
|
||||
|
|
|
|||
Loading…
Reference in a new issue