diff --git a/criu/cr-restore.c b/criu/cr-restore.c index abd55af00..29b1f274b 100644 --- a/criu/cr-restore.c +++ b/criu/cr-restore.c @@ -2167,7 +2167,7 @@ int cr_restore_tasks(void) if (init_stats(RESTORE_STATS)) goto err; - if (kerndat_init_rst()) + if (kerndat_init()) goto err; timing_start(TIME_RESTORE); diff --git a/criu/include/kerndat.h b/criu/include/kerndat.h index 9de8875d9..6edf4c6f5 100644 --- a/criu/include/kerndat.h +++ b/criu/include/kerndat.h @@ -11,7 +11,6 @@ struct stat; */ extern int kerndat_init(void); -extern int kerndat_init_rst(void); extern int kerndat_get_dirty_track(void); extern int kerndat_fdinfo_has_lock(void); extern int kerndat_loginuid(void); diff --git a/criu/kerndat.c b/criu/kerndat.c index 5f53f7d0a..0ad2596c8 100644 --- a/criu/kerndat.c +++ b/criu/kerndat.c @@ -589,40 +589,8 @@ int kerndat_init(void) ret = kerndat_tcp_repair(); if (!ret) ret = kerndat_compat_restore(); - - kerndat_lsm(); - kerndat_mmap_min_addr(); - - return ret; -} - -int kerndat_init_rst(void) -{ - int ret; - - /* - * Read TCP sysctls before anything else, - * since the limits we're interested in are - * not available inside namespaces. - */ - - ret = check_pagemap(); - if (!ret) - ret = get_last_cap(); if (!ret) ret = kerndat_has_memfd_create(); - if (!ret) - ret = get_task_size(); - if (!ret) - ret = get_ipv6(); - if (!ret) - ret = kerndat_loginuid(); - if (!ret) - ret = kerndat_iptables_has_xtlocks(); - if (!ret) - ret = kerndat_tcp_repair(); - if (!ret) - ret = kerndat_compat_restore(); kerndat_lsm(); kerndat_mmap_min_addr(); diff --git a/criu/lsm.c b/criu/lsm.c index 8c014d432..4f5c43605 100644 --- a/criu/lsm.c +++ b/criu/lsm.c @@ -111,7 +111,7 @@ void kerndat_lsm(void) { /* On restore, if someone passes --lsm-profile, we might end up doing * detection twice, once during flag parsing and once for - * kerndat_init_rst(). Let's detect when we've already done detection + * kerndat_init(). Let's detect when we've already done detection * and not do it again. */ if (name)