Commit d5d65ae2 authored by Radostin Stoyanov's avatar Radostin Stoyanov Committed by Andrei Vagin

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: 's avatarMike Rapoport <rppt@linux.ibm.com>
Signed-off-by: 's avatarRadostin Stoyanov <rstoyanov1@gmail.com>
parent 38769e94
......@@ -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;
......
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