mm,hwpoison: drop unneeded pcplist draining
[linux-2.6-microblaze.git] / mm / madvise.c
index a8d8d48..fe5c232 100644 (file)
@@ -877,7 +877,6 @@ static long madvise_remove(struct vm_area_struct *vma,
 static int madvise_inject_error(int behavior,
                unsigned long start, unsigned long end)
 {
-       struct zone *zone;
        unsigned long size;
 
        if (!capable(CAP_SYS_ADMIN))
@@ -922,10 +921,6 @@ static int madvise_inject_error(int behavior,
                        return ret;
        }
 
-       /* Ensure that all poisoned pages are removed from per-cpu lists */
-       for_each_populated_zone(zone)
-               drain_all_pages(zone);
-
        return 0;
 }
 #endif
@@ -1204,8 +1199,7 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec,
                goto put_pid;
        }
 
-       if (task->mm != current->mm &&
-                       !process_madvise_behavior_valid(behavior)) {
+       if (!process_madvise_behavior_valid(behavior)) {
                ret = -EINVAL;
                goto release_task;
        }