From a05f7b15deb2903d9f0b5df33ddd4d186d5ecac1 Mon Sep 17 00:00:00 2001 From: Pavel Emelianov Date: Thu, 18 Oct 2007 23:39:47 -0700 Subject: [PATCH] pid namespaces: make get_pid_ns() return the namespace itself 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 Acked-by: Cedric Le Goater Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Sukadev Bhattiprolu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/pid_namespace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index b9a17e08ff0f..ddb9a4c95968 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); -- 2.11.0