Skip to content

Commit

Permalink
ipcns: extract create_ipc_ns()
Browse files Browse the repository at this point in the history
clone_ipc_ns() is misnamed, it doesn't clone anything and doesn't use
passed parameter.  Rename it.

create_ipc_ns() will be used by C/R to create fresh ipcns.

Signed-off-by: Alexey Dobriyan <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Reviewed-by: WANG Cong <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexey Dobriyan authored and torvalds committed Jun 18, 2009
1 parent 6442428 commit 612ce47
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ipc/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "util.h"

static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns)
static struct ipc_namespace *create_ipc_ns(void)
{
struct ipc_namespace *ns;
int err;
Expand Down Expand Up @@ -48,14 +48,9 @@ static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns)

struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns)
{
struct ipc_namespace *new_ns;

if (!(flags & CLONE_NEWIPC))
return get_ipc_ns(ns);

new_ns = clone_ipc_ns(ns);

return new_ns;
return create_ipc_ns();
}

/*
Expand Down

0 comments on commit 612ce47

Please sign in to comment.