All of lore.kernel.org
 help / color / mirror / Atom feed
From: sayli karnik <karniksayli1995@gmail.com>
To: outreachy-kernel@googlegroups.com
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Subject: [PATCH] kernel: pid_namespace: Add kernel-doc comments
Date: Fri, 31 Mar 2017 00:35:34 +0530	[thread overview]
Message-ID: <20170330190534.GA5379@sayli-HP-15-Notebook-PC> (raw)

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



                 reply	other threads:[~2017-03-30 19:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170330190534.GA5379@sayli-HP-15-Notebook-PC \
    --to=karniksayli1995@gmail.com \
    --cc=mawilcox@microsoft.com \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.