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