X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=mm%2Fmemory-failure.c;h=46ab2c044b0e657ad1844dd291a3b537c97d58b6;hb=fa0d7e3de6d6fc5004ad9dea0dd6b286af8f03e9;hp=124324134ff67b3c4a0bc06661b4f70f2406840f;hpb=79346507ad48895f41b438fa562b1965721f36b9;p=~andy%2Flinux diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 124324134ff..46ab2c044b0 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -51,6 +51,7 @@ #include #include #include +#include #include "internal.h" int sysctl_memory_failure_early_kill __read_mostly = 0; @@ -1230,11 +1231,10 @@ static int get_any_page(struct page *p, unsigned long pfn, int flags) return 1; /* - * The lock_system_sleep prevents a race with memory hotplug, - * because the isolation assumes there's only a single user. + * The lock_memory_hotplug prevents a race with memory hotplug. * This is a big hammer, a better would be nicer. */ - lock_system_sleep(); + lock_memory_hotplug(); /* * Isolate the page, so that it doesn't get reallocated if it @@ -1264,7 +1264,7 @@ static int get_any_page(struct page *p, unsigned long pfn, int flags) ret = 1; } unset_migratetype_isolate(p); - unlock_system_sleep(); + unlock_memory_hotplug(); return ret; }