Commit 51fca380 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

namespaces: remove unused code

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f995673d
...@@ -180,11 +180,6 @@ struct cr_fdset *cr_task_fdset_open(int pid, int mode) ...@@ -180,11 +180,6 @@ struct cr_fdset *cr_task_fdset_open(int pid, int mode)
return cr_fdset_open(pid, _CR_FD_TASK_FROM, _CR_FD_TASK_TO, mode); return cr_fdset_open(pid, _CR_FD_TASK_FROM, _CR_FD_TASK_TO, mode);
} }
struct cr_fdset *cr_ns_fdset_open(int pid, int mode)
{
return cr_fdset_open(pid, _CR_FD_NS_FROM, _CR_FD_NS_TO, mode);
}
struct cr_fdset *cr_glob_fdset_open(int mode) struct cr_fdset *cr_glob_fdset_open(int mode)
{ {
return cr_fdset_open(-1 /* ignored */, _CR_FD_GLOB_FROM, _CR_FD_GLOB_TO, mode); return cr_fdset_open(-1 /* ignored */, _CR_FD_GLOB_FROM, _CR_FD_GLOB_TO, mode);
......
...@@ -124,7 +124,6 @@ int cr_exec(int pid, char **opts); ...@@ -124,7 +124,6 @@ int cr_exec(int pid, char **opts);
#define O_RSTR (O_RDONLY) #define O_RSTR (O_RDONLY)
struct cr_fdset *cr_task_fdset_open(int pid, int mode); struct cr_fdset *cr_task_fdset_open(int pid, int mode);
struct cr_fdset *cr_ns_fdset_open(int pid, int mode);
struct cr_fdset *cr_fdset_open(int pid, int from, int to, struct cr_fdset *cr_fdset_open(int pid, int from, int to,
unsigned long flags); unsigned long flags);
struct cr_fdset *cr_glob_fdset_open(int mode); struct cr_fdset *cr_glob_fdset_open(int mode);
......
...@@ -30,24 +30,21 @@ enum { ...@@ -30,24 +30,21 @@ enum {
/* /*
* NS entries * NS entries
*/ */
_CR_FD_NS_FROM,
CR_FD_UTSNS, CR_FD_UTSNS,
CR_FD_MNTS, CR_FD_MNTS,
_CR_FD_IPCNS_FROM = CR_FD_MNTS, _CR_FD_IPCNS_FROM,
CR_FD_IPC_VAR, CR_FD_IPC_VAR,
CR_FD_IPCNS_SHM, CR_FD_IPCNS_SHM,
CR_FD_IPCNS_MSG, CR_FD_IPCNS_MSG,
CR_FD_IPCNS_SEM, CR_FD_IPCNS_SEM,
_CR_FD_IPCNS_TO, _CR_FD_IPCNS_TO,
_CR_FD_NETNS_FROM = CR_FD_IPCNS_SEM, _CR_FD_NETNS_FROM,
CR_FD_NETDEV = _CR_FD_IPCNS_TO, CR_FD_NETDEV,
CR_FD_IFADDR, CR_FD_IFADDR,
CR_FD_ROUTE, CR_FD_ROUTE,
_CR_FD_NETNS_TO, _CR_FD_NETNS_TO,
_CR_FD_NS_TO = _CR_FD_NETNS_TO,
CR_FD_PSTREE, CR_FD_PSTREE,
CR_FD_SHMEM_PAGEMAP, CR_FD_SHMEM_PAGEMAP,
......
...@@ -350,14 +350,9 @@ int dump_task_ns_ids(struct pstree_item *item) ...@@ -350,14 +350,9 @@ int dump_task_ns_ids(struct pstree_item *item)
static int do_dump_namespaces(struct pid *ns_pid, unsigned int ns_flags) static int do_dump_namespaces(struct pid *ns_pid, unsigned int ns_flags)
{ {
struct cr_fdset *fdset;
pid_t ns_id = ns_pid->virt; pid_t ns_id = ns_pid->virt;
int ret = 0; int ret = 0;
fdset = cr_ns_fdset_open(ns_pid->virt, O_DUMP);
if (fdset == NULL)
return -1;
if (ns_flags & CLONE_NEWUTS) { if (ns_flags & CLONE_NEWUTS) {
pr_info("Dump UTS namespace\n"); pr_info("Dump UTS namespace\n");
ret = dump_uts_ns(ns_pid->real, ns_id); ret = dump_uts_ns(ns_pid->real, ns_id);
...@@ -383,7 +378,6 @@ static int do_dump_namespaces(struct pid *ns_pid, unsigned int ns_flags) ...@@ -383,7 +378,6 @@ static int do_dump_namespaces(struct pid *ns_pid, unsigned int ns_flags)
goto err; goto err;
} }
err: err:
close_cr_fdset(&fdset);
return ret; return ret;
} }
......
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