2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

seek_pagemap: Use pagemap_len()

The variable `len` is used only to calculate the value of `end`. We
already have the static inline function pagemap_len(), which can be
used instead.

Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
This commit is contained in:
Radostin Stoyanov
2019-02-19 19:58:48 +00:00
committed by Andrei Vagin
parent 38769e94d6
commit d5d65ae2c4

View File

@@ -150,8 +150,7 @@ static int seek_pagemap(struct page_read *pr, unsigned long vaddr)
do {
unsigned long start = pr->pe->vaddr;
unsigned long len = pr->pe->nr_pages * PAGE_SIZE;
unsigned long end = start + len;
unsigned long end = start + pagemap_len(pr->pe);
if (vaddr < pr->cvaddr)
break;