Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752906AbbGPGPU (ORCPT ); Thu, 16 Jul 2015 02:15:20 -0400 Received: from mail9.hitachi.co.jp ([133.145.228.44]:51734 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751389AbbGPGPS (ORCPT ); Thu, 16 Jul 2015 02:15:18 -0400 Message-ID: <55A74BED.9000104@hitachi.com> Date: Thu, 16 Jul 2015 15:15:09 +0900 From: Masami Hiramatsu Organization: Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Wang Long , ananth@in.ibm.com, anil.s.keshavamurthy@intel.com, davem@davemloft.net CC: linux-kernel@vger.kernel.org, wanglong@laoqinren.net, peifeiyue@huawei.com Subject: Re: [PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove References: <1437013002-104925-1-git-send-email-long.wanglong@huawei.com> In-Reply-To: <1437013002-104925-1-git-send-email-long.wanglong@huawei.com> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1369 Lines: 46 On 2015/07/16 11:16, Wang Long wrote: > In debugfs_kprobe_init, we create a directory 'kprobes' and three > files 'list', 'enabled' and 'blacklist'. When any one of the three > files creation fails, we should remove all of them. But debugfs_remove > function can not complete this work. So use debugfs_remove_recursive > instead. > OK, it should be fixed. Acked-by: Masami Hiramatsu Thank you! > Signed-off-by: Wang Long > --- > kernel/kprobes.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/kprobes.c b/kernel/kprobes.c > index c90e417..8cd82a5 100644 > --- a/kernel/kprobes.c > +++ b/kernel/kprobes.c > @@ -2459,7 +2459,7 @@ static int __init debugfs_kprobe_init(void) > return 0; > > error: > - debugfs_remove(dir); > + debugfs_remove_recursive(dir); > return -ENOMEM; > } > > -- Masami HIRAMATSU Linux Technology Research Center, System Productivity Research Dept. Center for Technology Innovation - Systems Engineering Hitachi, Ltd., Research & Development Group E-mail: masami.hiramatsu.pt@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/