ANDROID: mm: export symbols used in vendor hook android_vh_get_swap_page()
3 symbols are exported to be used in vendor hook android_vh_get_swap_page: 1)check_cache_active, used to get swap page from the specified swap location, it's usage is similar to the usage in get_swap_page 2)scan_swap_map_slots, used to get swap page from the specified swap, it's usage is similar to get_swap_pages 3)swap_alloc_cluster, used to get swap page from the specified swap, it's usage is similar to get_swap_pages Bug: 234214858 Signed-off-by: Bing Han <bing.han@transsion.com> Change-Id: Ie24c5d32a16c7cb87905d034095ec8fb070dbe0f
This commit is contained in:

committed by
Treehugger Robot

parent
d4eef93a9d
commit
06c2766cbc
@@ -90,7 +90,7 @@ void reenable_swap_slots_cache_unlock(void)
|
||||
mutex_unlock(&swap_slots_cache_enable_mutex);
|
||||
}
|
||||
|
||||
static bool check_cache_active(void)
|
||||
bool check_cache_active(void)
|
||||
{
|
||||
long pages;
|
||||
|
||||
@@ -111,6 +111,7 @@ static bool check_cache_active(void)
|
||||
out:
|
||||
return swap_slot_cache_active;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(check_cache_active);
|
||||
|
||||
static int alloc_swap_slot_cache(unsigned int cpu)
|
||||
{
|
||||
|
@@ -772,7 +772,7 @@ static void set_cluster_next(struct swap_info_struct *si, unsigned long next)
|
||||
this_cpu_write(*si->cluster_next_cpu, next);
|
||||
}
|
||||
|
||||
static int scan_swap_map_slots(struct swap_info_struct *si,
|
||||
int scan_swap_map_slots(struct swap_info_struct *si,
|
||||
unsigned char usage, int nr,
|
||||
swp_entry_t slots[])
|
||||
{
|
||||
@@ -988,8 +988,9 @@ no_page:
|
||||
si->flags -= SWP_SCANNING;
|
||||
return n_ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(scan_swap_map_slots);
|
||||
|
||||
static int swap_alloc_cluster(struct swap_info_struct *si, swp_entry_t *slot)
|
||||
int swap_alloc_cluster(struct swap_info_struct *si, swp_entry_t *slot)
|
||||
{
|
||||
unsigned long idx;
|
||||
struct swap_cluster_info *ci;
|
||||
@@ -1023,6 +1024,7 @@ static int swap_alloc_cluster(struct swap_info_struct *si, swp_entry_t *slot)
|
||||
|
||||
return 1;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(swap_alloc_cluster);
|
||||
|
||||
static void swap_free_cluster(struct swap_info_struct *si, unsigned long idx)
|
||||
{
|
||||
|
Reference in New Issue
Block a user