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

restore: don't add unneeded vma with zero start and end addresses

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ec583c74
......@@ -194,12 +194,13 @@ static int read_vmas(int pid, struct list_head *vmas, int *nr_vmas)
if (!vma)
break;
(*nr_vmas)++;
list_add_tail(&vma->list, vmas);
ret = pb_read_one_eof(fd, &e, PB_VMAS);
if (ret <= 0)
break;
(*nr_vmas)++;
list_add_tail(&vma->list, vmas);
if (e->fd != -1) {
ret = -1;
pr_err("Error in vma->fd setting (%Ld)\n",
......
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