[4/7] cr-check: verify uffd availability based on cached kdat

Submitted by Mike Rapoport on Aug. 15, 2017, 6:23 a.m.

Details

Message ID 1502778234-24415-5-git-send-email-rppt@linux.vnet.ibm.com
State New
Series "lazy-pages: update checks for availability of userfaultfd"
Headers show

Commit Message

Mike Rapoport Aug. 15, 2017, 6:23 a.m.
Since we initialize kdat early it is enough to check kdat.has_uffd and
kdat.uffd_features to verify availability of userfaultfd

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
---
 criu/cr-check.c | 3 ---
 1 file changed, 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/cr-check.c b/criu/cr-check.c
index b81d578..0c0a760 100644
--- a/criu/cr-check.c
+++ b/criu/cr-check.c
@@ -1053,9 +1053,6 @@  static int check_uffd(void)
 		UFFD_FEATURE_EVENT_UNMAP |
 		UFFD_FEATURE_EVENT_REMOVE;
 
-	if (kerndat_uffd())
-		return -1;
-
 	if (!kdat.has_uffd) {
 		pr_err("UFFD is not supported\n");
 		return -1;