[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090410023335.GD27788@x200.localdomain>
Date: Fri, 10 Apr 2009 06:33:35 +0400
From: Alexey Dobriyan <adobriyan@...il.com>
To: akpm@...ux-foundation.org, containers@...ts.linux-foundation.org
Cc: xemul@...allels.com, serue@...ibm.com, dave@...ux.vnet.ibm.com,
mingo@...e.hu, orenl@...columbia.edu, hch@...radead.org,
torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: [PATCH 03/30] ipcns: remove useless get/put while CLONE_NEWIPC
copy_ipcs() doesn't actually copy anything. If new ipcns is created,
it's created from scratch, in this case get/put on old ipcns isn't needed.
Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---
ipc/namespace.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--- a/ipc/namespace.c
+++ b/ipc/namespace.c
@@ -50,15 +50,11 @@ struct ipc_namespace *copy_ipcs(unsigned long flags, struct ipc_namespace *ns)
{
struct ipc_namespace *new_ns;
- BUG_ON(!ns);
- get_ipc_ns(ns);
-
if (!(flags & CLONE_NEWIPC))
- return ns;
+ return get_ipc_ns(ns);
new_ns = clone_ipc_ns(ns);
- put_ipc_ns(ns);
return new_ns;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists