Commit c430e2ee authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

restore: don't worry if an vma image file is absent

read_vmas will be called for zombies
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d5bc93e6
......@@ -180,11 +180,17 @@ static int read_vmas(int pid, struct list_head *vmas, int *nr_vmas)
{
int fd, ret = -1;
*nr_vmas = 0;
/* Skip errors, because a zombie doesn't have an image of vmas */
fd = open_image_ro(CR_FD_VMAS, pid);
if (fd < 0)
return fd;
if (fd < 0) {
if (errno == ENOENT)
return 0;
else
return fd;
}
*nr_vmas = 0;
while (1) {
struct vma_area *vma;
VmaEntry *e;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment