From: Tan Xiaojun <tanxiaojun@huawei.com>
To: <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] debugfs: update commits of debugfs_remove
Date: Wed, 14 Oct 2015 12:44:25 +0800 [thread overview]
Message-ID: <561DDDA9.4030009@huawei.com> (raw)
In-Reply-To: <1444791237-105846-1-git-send-email-tanxiaojun@huawei.com>
Please ignore this patch, I make a spelling mistake.
On 2015/10/14 10:53, Tan Xiaojun wrote:
> This function debugfs_remove can't remove a directory if it is not
> empty. The commits make misunderstood and cause misuse easily, so
> update it.
>
> Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
> ---
> fs/debugfs/inode.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
> index c711be8..350754e 100644
> --- a/fs/debugfs/inode.c
> +++ b/fs/debugfs/inode.c
> @@ -531,7 +531,8 @@ static int __debugfs_remove(struct dentry *dentry, struct dentry *parent)
> }
>
> /**
> - * debugfs_remove - removes a file or directory from the debugfs filesystem
> + * debugfs_remove - removes a file or an empty directory from the debugfs
> + * filesystem
> * @dentry: a pointer to a the dentry of the file or directory to be
> * removed.
> *
> @@ -542,6 +543,9 @@ static int __debugfs_remove(struct dentry *dentry, struct dentry *parent)
> * This function is required to be called in order for the file to be
> * removed, no automatic cleanup of files will happen when a module is
> * removed, you are responsible here.
> + *
> + * For removing directory, if you are not sure it is empty or not, use
> + * debugfs_remove_recursive instead.
> */
> void debugfs_remove(struct dentry *dentry)
> {
>
prev parent reply other threads:[~2015-10-14 4:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 2:53 [PATCH] debugfs: update commits of debugfs_remove Tan Xiaojun
2015-10-14 4:44 ` Tan Xiaojun [this message]
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=561DDDA9.4030009@huawei.com \
--to=tanxiaojun@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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