All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel: pid_namespace: Add kernel-doc comments
@ 2017-03-30 19:05 sayli karnik
  0 siblings, 0 replies; only message in thread
From: sayli karnik @ 2017-03-30 19:05 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Matthew Wilcox

Add kernel-doc comments for functions.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
---
 kernel/pid_namespace.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index 37e2b52..31dbc12 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -91,7 +91,11 @@ static void dec_pid_namespaces(struct ucounts *ucounts)
 {
 	dec_ucount(ucounts, UCOUNT_PID_NAMESPACES);
 }
-
+/**
+ * create_pid_namespace - creates a new pid namespace
+ * @user_namespace:		current user namespace
+ * @parent_pid_namespace:	parent of the user namespace
+ */
 static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns,
 	struct pid_namespace *parent_pid_ns)
 {
@@ -162,6 +166,11 @@ static void delayed_free_pidns(struct rcu_head *p)
 	kmem_cache_free(pid_ns_cachep, ns);
 }
 
+/**
+ * destroy_pid_namespace - Destroys the pid namespace
+ * @ns:	namespace to be destroyed
+ *
+ */
 static void destroy_pid_namespace(struct pid_namespace *ns)
 {
 	int i;
@@ -172,6 +181,12 @@ static void destroy_pid_namespace(struct pid_namespace *ns)
 	call_rcu(&ns->rcu, delayed_free_pidns);
 }
 
+/**
+ * copy_pid_ns - makes a copy of the pid namespace
+ * @user_ns:	new namespace to be created
+ * @old_ns:	namespace to be copied
+ *
+ */
 struct pid_namespace *copy_pid_ns(unsigned long flags,
 	struct user_namespace *user_ns, struct pid_namespace *old_ns)
 {
@@ -182,6 +197,10 @@ struct pid_namespace *copy_pid_ns(unsigned long flags,
 	return create_pid_namespace(user_ns, old_ns);
 }
 
+/**
+ * free_pid_ns - frees memory allocated to the pid namespace
+ * @kref:	reference of pid namespace to be freed
+ */
 static void free_pid_ns(struct kref *kref)
 {
 	struct pid_namespace *ns;
-- 
2.7.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-30 19:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30 19:05 [PATCH] kernel: pid_namespace: Add kernel-doc comments sayli karnik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.