diff --git a/include/linux/swap.h b/include/linux/swap.h index ba52f3a3478e..fce3a966718d 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -34,6 +34,8 @@ struct pagevec; SWAP_FLAG_DISCARD_PAGES) #define SWAP_BATCH 64 +int kswapd (void *p); + static inline int current_is_kswapd(void) { return current->flags & PF_KSWAPD; diff --git a/mm/vmscan.c b/mm/vmscan.c index 52b622f82d30..0bf4b853757d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -4296,7 +4296,7 @@ static void kswapd_try_to_sleep(pg_data_t *pgdat, int alloc_order, int reclaim_o * If there are applications that are active memory-allocators * (most normal use), this basically shouldn't matter. */ -static int kswapd(void *p) +int kswapd(void *p) { unsigned int alloc_order, reclaim_order; unsigned int highest_zoneidx = MAX_NR_ZONES - 1; @@ -4373,6 +4373,7 @@ kswapd_try_sleep: return 0; } +EXPORT_SYMBOL_GPL(kswapd); /* * A zone is low on free memory or too fragmented for high-order memory. If