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

shmem: used open_proc_rw to open proc files

open_proc_rw knows that proc may be mounted not in /proc,
it's used for restoring tasks in pid ns.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4ebc8759
...@@ -121,7 +121,7 @@ static int shmem_wait_and_open(int pid, struct shmem_info *si) ...@@ -121,7 +121,7 @@ static int shmem_wait_and_open(int pid, struct shmem_info *si)
futex_wait_until(&si->lock, 1); futex_wait_until(&si->lock, 1);
pr_info("Opening shmem [%s] \n", path); pr_info("Opening shmem [%s] \n", path);
ret = open(path, O_RDWR); ret = open_proc_rw(si->pid, "map_files/%lx-%lx", si->start, si->end);
if (ret < 0) if (ret < 0)
pr_perror(" %d: Can't stat shmem at %s", pr_perror(" %d: Can't stat shmem at %s",
si->pid, path); si->pid, path);
......
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