提交 e0d9bf4c 编写于 作者: F Fabian Frederick 提交者: Linus Torvalds

fs/dlm/debug_fs.c: remove unnecessary null test before debugfs_remove

This fixes checkpatch warning:

  WARNING: debugfs_remove(NULL) is safe this check is probably not required
Signed-off-by: NFabian Frederick <fabf@skynet.be>
Cc: Christine Caulfield <ccaulfie@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 fda9f990
...@@ -718,16 +718,11 @@ static const struct file_operations waiters_fops = { ...@@ -718,16 +718,11 @@ static const struct file_operations waiters_fops = {
void dlm_delete_debug_file(struct dlm_ls *ls) void dlm_delete_debug_file(struct dlm_ls *ls)
{ {
if (ls->ls_debug_rsb_dentry) debugfs_remove(ls->ls_debug_rsb_dentry);
debugfs_remove(ls->ls_debug_rsb_dentry); debugfs_remove(ls->ls_debug_waiters_dentry);
if (ls->ls_debug_waiters_dentry) debugfs_remove(ls->ls_debug_locks_dentry);
debugfs_remove(ls->ls_debug_waiters_dentry); debugfs_remove(ls->ls_debug_all_dentry);
if (ls->ls_debug_locks_dentry) debugfs_remove(ls->ls_debug_toss_dentry);
debugfs_remove(ls->ls_debug_locks_dentry);
if (ls->ls_debug_all_dentry)
debugfs_remove(ls->ls_debug_all_dentry);
if (ls->ls_debug_toss_dentry)
debugfs_remove(ls->ls_debug_toss_dentry);
} }
int dlm_create_debug_file(struct dlm_ls *ls) int dlm_create_debug_file(struct dlm_ls *ls)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册