HWPOISON: Undefine short-hand macros after use to avoid namespace conflict
[safe/jmp/linux-2.6] / mm / madvise.c
index 18970ae..7964e36 100644 (file)
@@ -230,14 +230,13 @@ static int madvise_hwpoison(unsigned long start, unsigned long end)
                return -EPERM;
        for (; start < end; start += PAGE_SIZE) {
                struct page *p;
-               int ret = get_user_pages(current, current->mm, start, 1,
-                                               0, 0, &p, NULL);
+               int ret = get_user_pages_fast(start, 1, 0, &p);
                if (ret != 1)
                        return ret;
                printk(KERN_INFO "Injecting memory failure for page %lx at %lx\n",
                       page_to_pfn(p), start);
                /* Ignore return value for now */
-               __memory_failure(page_to_pfn(p), 0, 1);
+               __memory_failure(page_to_pfn(p), 0, MF_COUNT_INCREASED);
        }
        return ret;
 }