Skip to content

Commit

Permalink
debugfs: document that debugfs_remove*() accepts NULL and error values
Browse files Browse the repository at this point in the history
According to commit a59d629 ("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 <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
ulfalizer authored and Jiri Kosina committed Sep 29, 2015
1 parent b5ffe63 commit 636db7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/debugfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 636db7a

Please sign in to comment.