From: Sasikantha babu <sasikanth.v19@gmail.com>
To: Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: linux-kernel@vger.kernel.org, Sasikantha babu <sasikanth.v19@gmail.com>
Subject: [PATCH] Kprobes : Recursively remove the directory on failure
Date: Tue, 3 Apr 2012 21:05:03 +0530 [thread overview]
Message-ID: <1333467303-20130-1-git-send-email-sasikanth.v19@gmail.com> (raw)
Remove the "kprobes" directory recursivly if "enabled" file creation fails
Signed-off-by: Sasikantha babu <sasikanth.v19@gmail.com>
---
kernel/kprobes.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index c62b854..9b45515 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -2251,7 +2251,7 @@ static int __kprobes debugfs_kprobe_init(void)
file = debugfs_create_file("enabled", 0600, dir,
&value, &fops_kp);
if (!file) {
- debugfs_remove(dir);
+ debugfs_remove_recursive(dir);
return -ENOMEM;
}
--
1.7.3.4
next reply other threads:[~2012-04-03 15:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 15:35 Sasikantha babu [this message]
2012-04-06 7:53 ` [PATCH] Kprobes : Recursively remove the directory on failure Masami Hiramatsu
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=1333467303-20130-1-git-send-email-sasikanth.v19@gmail.com \
--to=sasikanth.v19@gmail.com \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox