* [PATCH] Kprobes : Recursively remove the directory on failure
@ 2012-04-03 15:35 Sasikantha babu
2012-04-06 7:53 ` Masami Hiramatsu
0 siblings, 1 reply; 2+ messages in thread
From: Sasikantha babu @ 2012-04-03 15:35 UTC (permalink / raw)
To: Ananth N Mavinakayanahalli, Anil S Keshavamurthy,
David S. Miller, Masami Hiramatsu
Cc: linux-kernel, Sasikantha babu
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Kprobes : Recursively remove the directory on failure
2012-04-03 15:35 [PATCH] Kprobes : Recursively remove the directory on failure Sasikantha babu
@ 2012-04-06 7:53 ` Masami Hiramatsu
0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2012-04-06 7:53 UTC (permalink / raw)
To: Sasikantha babu
Cc: Ananth N Mavinakayanahalli, Anil S Keshavamurthy,
David S. Miller, linux-kernel, yrl.pp-manager.tt
(2012/04/04 0:35), Sasikantha babu wrote:
> Remove the "kprobes" directory recursivly if "enabled" file creation fails
>
> Signed-off-by: Sasikantha babu <sasikanth.v19@gmail.com>
Right, this should remove recursively, because there is
"list" file already.
Thank you!
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.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;
> }
>
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-06 7:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-03 15:35 [PATCH] Kprobes : Recursively remove the directory on failure Sasikantha babu
2012-04-06 7:53 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).