summaryrefslogtreecommitdiffstats
path: root/fs/debugfs/inode.c
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2015-09-07 19:03:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-04 11:36:07 +0100
commit398dc4ad52022c3d585908544b936bdf73640727 (patch)
treef5afefb66de48b8d0100006a9d609628740000b7 /fs/debugfs/inode.c
parent621a5f7ad9cd1ce7933f1d302067cbd58354173c (diff)
downloadlinux-stable-398dc4ad52022c3d585908544b936bdf73640727.tar.gz
linux-stable-398dc4ad52022c3d585908544b936bdf73640727.tar.bz2
linux-stable-398dc4ad52022c3d585908544b936bdf73640727.zip
debugfs: document that debugfs_remove*() accepts NULL and error values
According to commit a59d6293e537 ("debugfs: change parameter check in debugfs_remove() functions"), this is meant to make cleanup easier for callers. In that case it ought to be documented. Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/debugfs/inode.c')
-rw-r--r--fs/debugfs/inode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index c711be8d6a3c..5d8f35f1382a 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -533,7 +533,8 @@ static int __debugfs_remove(struct dentry *dentry, struct dentry *parent)
/**
* debugfs_remove - removes a file or directory from the debugfs filesystem
* @dentry: a pointer to a the dentry of the file or directory to be
- * removed.
+ * removed. If this parameter is NULL or an error value, nothing
+ * will be done.
*
* This function removes a file or directory in debugfs that was previously
* created with a call to another debugfs function (like
@@ -565,7 +566,8 @@ EXPORT_SYMBOL_GPL(debugfs_remove);
/**
* debugfs_remove_recursive - recursively removes a directory
- * @dentry: a pointer to a the dentry of the directory to be removed.
+ * @dentry: a pointer to a the dentry of the directory to be removed. If this
+ * parameter is NULL or an error value, nothing will be done.
*
* This function recursively removes a directory tree in debugfs that
* was previously created with a call to another debugfs function