diff --git a/include/linux/mm.h b/include/linux/mm.h index f801fa5e6028926da667533aaf3e6bb3a6b8c19e..7b724d39e6ee018602c2eaf993c048b1546be67e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2866,6 +2866,8 @@ extern int sysctl_memory_failure_recovery; extern void shake_page(struct page *p, int access); extern atomic_long_t num_poisoned_pages __read_mostly; extern int soft_offline_page(struct page *page, int flags); +extern void collect_procs(struct page *page, struct list_head *tokill, + int force_early); /* diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 52619a9bc3b0e42b014d3c3bd98f698cc3f29838..72e1746e5386f66cd3c3bacea612c69a8d8aee66 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -512,7 +512,7 @@ static void collect_procs_file(struct page *page, struct list_head *to_kill, * First preallocate one tokill structure outside the spin locks, * so that we can kill at least one process reasonably reliable. */ -static void collect_procs(struct page *page, struct list_head *tokill, +void collect_procs(struct page *page, struct list_head *tokill, int force_early) { struct to_kill *tk; @@ -529,6 +529,7 @@ static void collect_procs(struct page *page, struct list_head *tokill, collect_procs_file(page, tokill, &tk, force_early); kfree(tk); } +EXPORT_SYMBOL_GPL(collect_procs); static const char *action_name[] = { [MF_IGNORED] = "Ignored",