mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
mm/swap_slots.c: add warning if swap slots cache failed to initialize
Add a warning diagnostics to user if we failed to allocate swap slots cache and use it. [[email protected]: use WARN_ONCE return value, fix grammar in message] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Tim Chen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9927e38876
commit
9b7a814327
1 changed files with 3 additions and 1 deletions
|
|
@ -241,8 +241,10 @@ int enable_swap_slots_cache(void)
|
|||
|
||||
ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "swap_slots_cache",
|
||||
alloc_swap_slot_cache, free_slot_cache);
|
||||
if (ret < 0)
|
||||
if (WARN_ONCE(ret < 0, "Cache allocation failed (%s), operating "
|
||||
"without swap slots cache.\n", __func__))
|
||||
goto out_unlock;
|
||||
|
||||
swap_slot_cache_initialized = true;
|
||||
__reenable_swap_slots_cache();
|
||||
out_unlock:
|
||||
|
|
|
|||
Loading…
Reference in a new issue