[CRIU] [PATCH v3 13/19] lazy-pages: make uffd_{copy, zero} return 0 on success

Mike Rapoport rppt at linux.vnet.ibm.com
Tue Nov 15 08:57:22 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 2782531..d9aa98d 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -544,7 +544,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)
@@ -566,7 +566,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