2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

lazy-pages: fix zero pages handling

page_read->seek_page was restored to skip zero pagemaps, therefore we
should check its return value rather than underlying PME.

travis-ci: success for uffd: A new set of improvements
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Mike Rapoport
2016-11-15 18:57:14 +02:00
committed by Andrei Vagin
parent a98eed95fa
commit ec585622ef

View File

@@ -565,11 +565,9 @@ static int uffd_handle_page(struct lazy_pages_info *lpi, __u64 address,
lpi->pr.reset(&lpi->pr);
ret = lpi->pr.seek_page(&lpi->pr, address);
if (ret < 0) {
pr_err("%d: no pagemap containing %llx\n", lpi->pid, address);
return ret;
}
ret = lpi->pr.seek_pagemap(&lpi->pr, address);
if (!ret)
return 0;
if (pagemap_zero(lpi->pr.pe))
return uffd_zero_page(lpi, address);