[CRIU] [RFC PATCH 05/16] criu: lazy_pages: remove pages list updates from handle_user_fault

Mike Rapoport rppt at linux.vnet.ibm.com
Tue Sep 27 06:42:06 PDT 2016


Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
 criu/uffd.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/criu/uffd.c b/criu/uffd.c
index 3f25b86..e8b84cd 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -775,7 +775,6 @@ static int handle_user_fault(struct lazy_pages_info *lpi, void *dest)
 	struct uffd_msg msg;
 	__u64 flags;
 	__u64 address;
-	struct uffd_pages_struct *uffd_pages;
 	int ret;
 
 	ret = read(lpi->uffd, &msg, sizeof(msg));
@@ -792,11 +791,6 @@ static int handle_user_fault(struct lazy_pages_info *lpi, void *dest)
 	address = msg.arg.pagefault.address & ~(page_size() - 1);
 	pr_debug("msg.arg.pagefault.address 0x%llx\n", address);
 
-	/* Make sure to not transfer a page twice */
-	list_for_each_entry(uffd_pages, &lpi->pages, list)
-		if ((uffd_pages->addr == address) && (uffd_pages->flags & UFFD_FLAG_SENT))
-			return 0;
-
 	/* Now handle the pages actually requested. */
 	flags = msg.arg.pagefault.flags;
 	pr_debug("msg.arg.pagefault.flags 0x%llx\n", flags);
-- 
1.9.1



More information about the CRIU mailing list