Commit cb788e84 authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Andrew Morton

lib/stackdepot: rename init_stack_pool

Rename init_stack_pool to depot_init_pool to align the name with
depot_alloc_stack.

No functional changes.

Link: https://lkml.kernel.org/r/23106a3e291d8df0aba33c0e2fe86dc596286479.1676063693.git.andreyknvl@google.comSigned-off-by: default avatarAndrey Konovalov <andreyknvl@google.com>
Reviewed-by: default avatarAlexander Potapenko <glider@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 424cafee
...@@ -218,7 +218,7 @@ int stack_depot_init(void) ...@@ -218,7 +218,7 @@ int stack_depot_init(void)
} }
EXPORT_SYMBOL_GPL(stack_depot_init); EXPORT_SYMBOL_GPL(stack_depot_init);
static bool init_stack_pool(void **prealloc) static bool depot_init_pool(void **prealloc)
{ {
if (!*prealloc) if (!*prealloc)
return false; return false;
...@@ -265,12 +265,12 @@ depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc) ...@@ -265,12 +265,12 @@ depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc)
/* /*
* smp_store_release() here pairs with smp_load_acquire() from * smp_store_release() here pairs with smp_load_acquire() from
* |next_pool_inited| in stack_depot_save() and * |next_pool_inited| in stack_depot_save() and
* init_stack_pool(). * depot_init_pool().
*/ */
if (pool_index + 1 < DEPOT_MAX_POOLS) if (pool_index + 1 < DEPOT_MAX_POOLS)
smp_store_release(&next_pool_inited, 0); smp_store_release(&next_pool_inited, 0);
} }
init_stack_pool(prealloc); depot_init_pool(prealloc);
if (stack_pools[pool_index] == NULL) if (stack_pools[pool_index] == NULL)
return NULL; return NULL;
...@@ -399,7 +399,7 @@ depot_stack_handle_t __stack_depot_save(unsigned long *entries, ...@@ -399,7 +399,7 @@ depot_stack_handle_t __stack_depot_save(unsigned long *entries,
* lock. * lock.
* *
* The smp_load_acquire() here pairs with smp_store_release() to * The smp_load_acquire() here pairs with smp_store_release() to
* |next_pool_inited| in depot_alloc_stack() and init_stack_pool(). * |next_pool_inited| in depot_alloc_stack() and depot_init_pool().
*/ */
if (unlikely(can_alloc && !smp_load_acquire(&next_pool_inited))) { if (unlikely(can_alloc && !smp_load_acquire(&next_pool_inited))) {
/* /*
...@@ -435,7 +435,7 @@ depot_stack_handle_t __stack_depot_save(unsigned long *entries, ...@@ -435,7 +435,7 @@ depot_stack_handle_t __stack_depot_save(unsigned long *entries,
* We didn't need to store this stack trace, but let's keep * We didn't need to store this stack trace, but let's keep
* the preallocated memory for the future. * the preallocated memory for the future.
*/ */
WARN_ON(!init_stack_pool(&prealloc)); WARN_ON(!depot_init_pool(&prealloc));
} }
raw_spin_unlock_irqrestore(&pool_lock, flags); raw_spin_unlock_irqrestore(&pool_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment