diff --git a/criu/file-lock.c b/criu/file-lock.c index 2d4036c75..821821f59 100644 --- a/criu/file-lock.c +++ b/criu/file-lock.c @@ -426,11 +426,6 @@ int prepare_file_locks(int pid) if (!opts.handle_file_locks) return 0; - if (!(file_locks_cinfo.flags & COLLECT_HAPPENED)) { - pr_warn("Per-pid file locks are deprecated\n"); - return -1; - } - return restore_file_locks(pid); } diff --git a/criu/protobuf.c b/criu/protobuf.c index 5c770b847..219c7c088 100644 --- a/criu/protobuf.c +++ b/criu/protobuf.c @@ -186,7 +186,6 @@ int collect_image(struct collect_image_info *cinfo) if (!img) return -1; - cinfo->flags |= COLLECT_HAPPENED; if (cinfo->flags & COLLECT_SHARED) { o_alloc = shmalloc; o_free = shfree_last; @@ -210,6 +209,7 @@ int collect_image(struct collect_image_info *cinfo) break; } + cinfo->flags |= COLLECT_HAPPENED; ret = cinfo->collect(obj, msg, img); if (ret < 0) { o_free(obj);