Message ID | 20220311215047.C9E80C340E9@smtp.kernel.org |
---|---|
State | Superseded |
Headers | show |
Series | + mm-madvise-return-correct-bytes-advised-with-process_madvise.patch added to -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);