From: Christoph Lameter Date: Sat, 14 Jan 2006 21:20:46 +0000 (-0800) Subject: [PATCH] Fix for CONFIG_NUMA without CONFIG_SWAP X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=852cf918dcf2ae46468b425e679fbcbf0ea8fdbb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] Fix for CONFIG_NUMA without CONFIG_SWAP Some people apparently run CONFIG_NUMA without CONFIG_SWAP. The migration code currently depends on swap. This patch provides a set of inline fallback functions so that the kernel properly compiles. However, calls to migration functions will fail. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/swap.h b/include/linux/swap.h index 389d1c382e20..e92054d6530b 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -180,6 +180,11 @@ extern int isolate_lru_page(struct page *p); extern int putback_lru_pages(struct list_head *l); extern int migrate_pages(struct list_head *l, struct list_head *t, struct list_head *moved, struct list_head *failed); +#else +static inline int isolate_lru_page(struct page *p) { return -ENOSYS; } +static inline int putback_lru_pages(struct list_head *l) { return 0; } +static inline int migrate_pages(struct list_head *l, struct list_head *t, + struct list_head *moved, struct list_head *failed) { return -ENOSYS; } #endif #ifdef CONFIG_MMU