Commit 1b21a27b authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

restore: Simplify shmem_wait_and_open

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent d0a6e9a1
......@@ -158,13 +158,10 @@ static int shmem_wait_and_open(struct shmem_info *si)
ret = open(path, O_RDWR);
if (ret >= 0)
return ret;
if (ret < 0) {
else if (ret < 0)
pr_perror(" %d: Can't stat shmem at %s\n",
si->real_pid, path);
return -1;
}
return 0;
return ret;
}
static int collect_shmem(int pid, struct shmem_entry *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