Commit 5434d99e authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Cyrill Gorcunov

parasite_infect_seized(): use open_proc_rw()

Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 03294077
......@@ -564,7 +564,6 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, int pid_dir, struct list_
{
struct parasite_ctl *ctl = NULL;
struct vma_area *vma_area;
char fname[128];
int ret, fd;
/*
......@@ -621,9 +620,8 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, int pid_dir, struct list_
ctl->map_length = round_up(parasite_size, PAGE_SIZE);
snprintf(fname, sizeof(fname), "map_files/%p-%p",
fd = open_proc_rw(pid_dir, "map_files/%p-%p",
ctl->remote_map, ctl->remote_map + ctl->map_length);
fd = openat(pid_dir, fname, O_RDWR);
if (fd < 0) {
pr_perror("Can't open remote parasite map");
goto err_restore;
......
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