[Devel] [PATCH criu-stable] memory/pid-reuse: allow no stats image to
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Fri Mar 23 12:09:19 MSK 2018
https://jira.sw.ru/browse/PSBM-82806
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
criu/mem.c | 8 +-------
criu/stats.c | 2 +-
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/criu/mem.c b/criu/mem.c
index 8d56b729a..a1876dfcd 100644
--- a/criu/mem.c
+++ b/criu/mem.c
@@ -313,13 +313,7 @@ static int detect_pid_reuse(struct pstree_item *item,
return -1;
}
- if (!parent_se) {
- pr_perror("No parent stats, for real error, please, " \
- "check warnings in get_parent_stats");
- return -1;
- }
-
- if (parent_se->dump->has_dump_uptime) {
+ if (parent_se && parent_se->dump->has_dump_uptime) {
unsigned long long dump_ticks;
dump_ticks = parent_se->dump->dump_uptime/(USEC_PER_SEC/tps);
diff --git a/criu/stats.c b/criu/stats.c
index d344ad336..d80dac023 100644
--- a/criu/stats.c
+++ b/criu/stats.c
@@ -203,7 +203,7 @@ void write_stats(int what)
} else
return;
- img = open_image_at(AT_FDCWD, CR_FD_STATS, O_DUMP, name);
+ img = open_image_at(get_service_fd(IMG_FD_OFF), CR_FD_STATS, O_DUMP, name);
if (img) {
pb_write_one(img, &stats, PB_STATS);
close_image(img);
--
2.14.3
More information about the Devel
mailing list