mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-03 07:45:17 +00:00
files: Don't fail on missing fs.img for zombies
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
9
files.c
9
files.c
@@ -1077,9 +1077,13 @@ int prepare_fs_pid(struct pstree_item *item)
|
|||||||
int ifd;
|
int ifd;
|
||||||
FsEntry *fe;
|
FsEntry *fe;
|
||||||
|
|
||||||
ifd = open_image(CR_FD_FS, O_RSTR, pid);
|
ifd = open_image(CR_FD_FS, O_RSTR | O_OPT, pid);
|
||||||
if (ifd < 0)
|
if (ifd < 0) {
|
||||||
|
if (ifd == -ENOENT)
|
||||||
|
goto ok;
|
||||||
|
else
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (pb_read_one(ifd, &fe, PB_FS) < 0)
|
if (pb_read_one(ifd, &fe, PB_FS) < 0)
|
||||||
goto out_i;
|
goto out_i;
|
||||||
@@ -1102,6 +1106,7 @@ int prepare_fs_pid(struct pstree_item *item)
|
|||||||
ri->umask = fe->umask;
|
ri->umask = fe->umask;
|
||||||
|
|
||||||
fs_entry__free_unpacked(fe, NULL);
|
fs_entry__free_unpacked(fe, NULL);
|
||||||
|
ok:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_f:
|
out_f:
|
||||||
|
Reference in New Issue
Block a user