Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1246299

Re: [PATCH] debugfs: update commits of debugfs_remove

From Tan Xiaojun <tanxiaojun@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH] debugfs: update commits of debugfs_remove
Date 2015-10-14 06:50 +0200
Message-ID <qjmaJ-4BC-7@gated-at.bofh.it> (permalink)
References <qjkiC-1GN-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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)
>  {
> 


--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] debugfs: update commits of debugfs_remove Tan Xiaojun <tanxiaojun@huawei.com> - 2015-10-14 04:50 +0200
  Re: [PATCH] debugfs: update commits of debugfs_remove Tan Xiaojun <tanxiaojun@huawei.com> - 2015-10-14 06:50 +0200

csiph-web