ANDROID: create and export is_swap_slot_cache_enabled

Create and export a function is_swap_slot_cache_enabled
to check whether the swap slot cache can be used.

Bug: 234214858
Signed-off-by: Bing Han <bing.han@transsion.com>
Change-Id: Iaca9519b838e0c3c8c06acbec83003f8309aa363
This commit is contained in:
Bing Han
2022-05-30 16:39:40 +08:00
committed by Treehugger Robot
parent f6f18f7ffa
commit e064059673

View File

@@ -92,6 +92,12 @@ void reenable_swap_slots_cache_unlock(void)
mutex_unlock(&swap_slots_cache_enable_mutex); mutex_unlock(&swap_slots_cache_enable_mutex);
} }
bool is_swap_slot_cache_enabled(void)
{
return swap_slot_cache_enabled;
}
EXPORT_SYMBOL_GPL(is_swap_slot_cache_enabled);
bool check_cache_active(void) bool check_cache_active(void)
{ {
long pages; long pages;