mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mm: migrate: add isolate_movable_page() stub implementation
@ 2017-01-25 22:27 Arnd Bergmann
  2017-01-26  7:39 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-01-25 22:27 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Yisheng Xie, Michal Hocko, Minchan Kim, Naoya Horiguchi,
	Arnd Bergmann, Vlastimil Babka, Gioh Kim, Ganesh Mahendran,
	linux-kernel

Without CONFIG_MIGRATION, we get a build failure when trying to
call isolate_movable_page():

mm/memory-failure.c: In function '__soft_offline_page':
mm/memory-failure.c:1656:10: error: implicit declaration of function 'isolate_movable_page';did you mean 'isolate_huge_page'? [-Werror=implicit-function-declaration]

This adds one more static inline helper function in the header
declaring it. This returns false to indicate that the
page was not isolated.

Fixes: mmotm ("HWPOISON: soft offlining for non-lru movable pages")
Fixes: bda807d44454 ("mm: migrate: support non-lru movable page migration")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/migrate.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index ae8d475a9385..09dd6e924106 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -57,6 +57,9 @@ static inline int migrate_pages(struct list_head *l, new_page_t new,
 		int reason)
 	{ return -ENOSYS; }
 
+static inline bool isolate_movable_page(struct page *page, isolate_mode_t mode)
+	{ return false; }
+
 static inline int migrate_prep(void) { return -ENOSYS; }
 static inline int migrate_prep_local(void) { return -ENOSYS; }
 
-- 
2.9.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-26  7:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 22:27 [PATCH] mm: migrate: add isolate_movable_page() stub implementation Arnd Bergmann
2017-01-26  7:39 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®