OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 0/3] Parts of pid namespaces approved by all the
[PATCH 2/3] Make get_pid_ns() return the namespace itself [message #19285 is a reply to message #19283] Tue, 10 July 2007 14:23 Go to previous messageGo to previous message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
Make get_pid_ns() return the namespace itself to look like
the other getters and make the code using it look nicer.

Signed-off-by: Pavel Emelianov <xemul@openvz.org>
Acked-by: Cedric Le Goater <clg@fr.ibm.com>

---

diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
index b9a17e0..ddb9a4c 100644
--- a/include/linux/pid_namespace.h
+++ b/include/linux/pid_namespace.h
@@ -24,9 +24,10 @@ struct pid_namespace {
 
 extern struct pid_namespace init_pid_ns;
 
-static inline void get_pid_ns(struct pid_namespace *ns)
+static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
 {
 	kref_get(&ns->kref);
+	return ns;
 }
 
 extern struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *ns);
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Lost JBD fix
Next Topic: [PATCH 0/5] Misc helper patches for pid namespaces
Goto Forum:
  


Current Time: Wed Sep 18 10:05:04 GMT 2024

Total time taken to generate the page: 0.04615 seconds