Commit af2debd5 authored by Alexander Gordeev's avatar Alexander Gordeev

s390/crash: make copy_oldmem_page() return number of bytes copied

Callback copy_oldmem_page() returns either error code or zero.
Instead, it should return the error code or number of bytes copied.

Fixes: df9694c7 ("s390/dump: streamline oldmem copy functions")
Reviewed-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
Tested-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
parent cc02e6e2
......@@ -233,9 +233,10 @@ ssize_t copy_oldmem_page(struct iov_iter *iter, unsigned long pfn, size_t csize,
rc = copy_oldmem_user(iter->iov->iov_base, src, csize);
else
rc = copy_oldmem_kernel(iter->kvec->iov_base, src, csize);
if (!rc)
iov_iter_advance(iter, csize);
return rc;
if (rc < 0)
return rc;
iov_iter_advance(iter, csize);
return csize;
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment