[CRIU] [RFC PATCH 2/7] lazy-pages: make uffd_{copy, zero} return 0 on success

Mike Rapoport rppt at linux.vnet.ibm.com
Mon Nov 14 07:37:25 PST 2016


In early days of uffd.c return value from uffd_copy was used to count
transferred pages. Since this is not the case anymore we can use 0 as
success.

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

diff --git a/criu/uffd.c b/criu/uffd.c
index 3eddf85..73ae09e 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -543,7 +543,7 @@ static int uffd_copy(struct lazy_pages_info *lpi, __u64 address, int nr_pages)
 
 	lpi->copied_pages += nr_pages;
 
-	return uffdio_copy.copy;
+	return 0;
 }
 
 static int uffd_zero(struct lazy_pages_info *lpi, __u64 address, int nr_pages)
@@ -565,7 +565,7 @@ static int uffd_zero(struct lazy_pages_info *lpi, __u64 address, int nr_pages)
 		return -1;
 	}
 
-	return len;
+	return 0;
 }
 
 static int uffd_handle_pages(struct lazy_pages_info *lpi, __u64 address, int nr)
-- 
1.9.1



More information about the CRIU mailing list