Merge 5.18-rc5 into driver-core-next
[linux-2.6-microblaze.git] / mm / madvise.c
index b41858e..1873616 100644 (file)
@@ -1464,16 +1464,9 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec,
 
        while (iov_iter_count(&iter)) {
                iovec = iov_iter_iovec(&iter);
-               /*
-                * do_madvise returns ENOMEM if unmapped holes are present
-                * in the passed VMA. process_madvise() is expected to skip
-                * unmapped holes passed to it in the 'struct iovec' list
-                * and not fail because of them. Thus treat -ENOMEM return
-                * from do_madvise as valid and continue processing.
-                */
                ret = do_madvise(mm, (unsigned long)iovec.iov_base,
                                        iovec.iov_len, behavior);
-               if (ret < 0 && ret != -ENOMEM)
+               if (ret < 0)
                        break;
                iov_iter_advance(&iter, iovec.iov_len);
        }