ANDROID: mm: Fix implicit declaration of function 'isolate_lru_page'

When compiled with CONFIG_SHMEM=n, shmem.c does not include internal.h
and isolate_lru_page function declaration can't be found.
Fix this by making isolate_lru_page usage conditional upon CONFIG_SHMEM
inside reclaim_shmem_address_space.

Fixes: daeabfe7fa ("ANDROID: mm: add reclaim_shmem_address_space() for faster reclaims")
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ia46a57681d26ac103e84ef7caa61a22dbd45cf04
This commit is contained in:
Suren Baghdasaryan
2022-03-24 11:00:05 -07:00
parent e2c0e8502e
commit 404df4751a

View File

@@ -4307,6 +4307,7 @@ EXPORT_SYMBOL_GPL(shmem_mark_page_lazyfree);
int reclaim_shmem_address_space(struct address_space *mapping) int reclaim_shmem_address_space(struct address_space *mapping)
{ {
#ifdef CONFIG_SHMEM
pgoff_t start = 0; pgoff_t start = 0;
struct page *page; struct page *page;
LIST_HEAD(page_list); LIST_HEAD(page_list);
@@ -4340,5 +4341,8 @@ int reclaim_shmem_address_space(struct address_space *mapping)
reclaimed = reclaim_pages_from_list(&page_list); reclaimed = reclaim_pages_from_list(&page_list);
return reclaimed; return reclaimed;
#else
return 0;
#endif
} }
EXPORT_SYMBOL_GPL(reclaim_shmem_address_space); EXPORT_SYMBOL_GPL(reclaim_shmem_address_space);