mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-01 22:33:30 +00:00
lazy-pages: merge compete_page_fault into uffd_io_complete
There's no real point to have two-liner wrapper for compete_page_fault and uffd_io_complete is better semantically. Acked-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
6cc31a7f0b
commit
2335be271f
1 changed files with 4 additions and 9 deletions
13
criu/uffd.c
13
criu/uffd.c
|
|
@ -711,11 +711,14 @@ static int uffd_copy(struct lazy_pages_info *lpi, __u64 address, int nr_pages)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int complete_page_fault(struct lazy_pages_info *lpi, unsigned long img_addr, int nr)
|
||||
static int uffd_io_complete(struct page_read *pr, unsigned long img_addr, int nr)
|
||||
{
|
||||
struct lazy_pages_info *lpi;
|
||||
unsigned long addr = 0;
|
||||
struct lp_req *req;
|
||||
|
||||
lpi = container_of(pr, struct lazy_pages_info, pr);
|
||||
|
||||
list_for_each_entry(req, &lpi->reqs, l) {
|
||||
if (req->img_addr == img_addr) {
|
||||
addr = req->addr;
|
||||
|
|
@ -741,14 +744,6 @@ static int complete_page_fault(struct lazy_pages_info *lpi, unsigned long img_ad
|
|||
return drop_lazy_iovs(lpi, addr, nr * PAGE_SIZE);
|
||||
}
|
||||
|
||||
static int uffd_io_complete(struct page_read *pr, unsigned long img_addr, int nr)
|
||||
{
|
||||
struct lazy_pages_info *lpi;
|
||||
|
||||
lpi = container_of(pr, struct lazy_pages_info, pr);
|
||||
return complete_page_fault(lpi, img_addr, nr);
|
||||
}
|
||||
|
||||
static int uffd_zero(struct lazy_pages_info *lpi, __u64 address, int nr_pages)
|
||||
{
|
||||
struct uffdio_zeropage uffdio_zeropage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue