Message ID | 20220325013231.BB7FEC340F5@smtp.kernel.org |
---|---|
State | New |
Headers | show |
Series | [merged] mm-madvise-return-correct-bytes-advised-with-process_madvise.patch removed from -mm tree | expand |
--- a/mm/madvise.c~mm-madvise-return-correct-bytes-advised-with-process_madvise +++ a/mm/madvise.c @@ -1435,8 +1435,7 @@ SYSCALL_DEFINE5(process_madvise, int, pi iov_iter_advance(&iter, iovec.iov_len); } - if (ret == 0) - ret = total_len - iov_iter_count(&iter); + ret = (total_len - iov_iter_count(&iter)) ? : ret; release_mm: mmput(mm);