projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9927e38
)
mm/swap_slots.c: add warning if swap slots cache failed to initialize
author
Tim Chen
<
[email protected]
>
Wed, 3 May 2017 21:54:48 +0000
(14:54 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 3 May 2017 22:52:10 +0000
(15:52 -0700)
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]
>
mm/swap_slots.c
patch
|
blob
|
history
diff --git
a/mm/swap_slots.c
b/mm/swap_slots.c
index b1ccb58ad397403214a220e4a0ac7901a6b6ae1e..aa1c415f4abd6785ee7ee5d6f3f56ab74cd7bc60 100644
(file)
--- a/
mm/swap_slots.c
+++ b/
mm/swap_slots.c
@@
-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: