All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] debugfs: update commits of debugfs_remove
@ 2015-10-14  2:53 Tan Xiaojun
  2015-10-14  4:44 ` Tan Xiaojun
  0 siblings, 1 reply; 2+ messages in thread
From: Tan Xiaojun @ 2015-10-14  2:53 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] debugfs: update commits of debugfs_remove
  2015-10-14  2:53 [PATCH] debugfs: update commits of debugfs_remove Tan Xiaojun
@ 2015-10-14  4:44 ` Tan Xiaojun
  0 siblings, 0 replies; 2+ messages in thread
From: Tan Xiaojun @ 2015-10-14  4:44 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-14  4:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14  2:53 [PATCH] debugfs: update commits of debugfs_remove Tan Xiaojun
2015-10-14  4:44 ` Tan Xiaojun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.