summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/debug.c
diff options
context:
space:
mode:
authorShenghui Wang <shhuiw@foxmail.com>2018-12-13 17:53:47 +0300
committerJens Axboe <axboe@kernel.dk>2018-12-13 18:15:54 +0300
commitae17102316550b4b230a283febe31b2a9ff30084 (patch)
treec75c86901de423e92d0c2f96603277bac8c7372d /drivers/md/bcache/debug.c
parentd2f96f487f471b4c718324ecd1540c89d2be52ac (diff)
downloadlinux-ae17102316550b4b230a283febe31b2a9ff30084.tar.xz
bcache: do not check if debug dentry is ERR or NULL explicitly on remove
debugfs_remove and debugfs_remove_recursive will check if the dentry pointer is NULL or ERR, and will do nothing in that case. Remove the check in cache_set_free and bch_debug_init. Signed-off-by: Shenghui Wang <shhuiw@foxmail.com> Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/debug.c')
-rw-r--r--drivers/md/bcache/debug.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c
index 8f448b9c96a1..8b123be05254 100644
--- a/drivers/md/bcache/debug.c
+++ b/drivers/md/bcache/debug.c
@@ -249,8 +249,7 @@ void bch_debug_init_cache_set(struct cache_set *c)
void bch_debug_exit(void)
{
- if (!IS_ERR_OR_NULL(bcache_debug))
- debugfs_remove_recursive(bcache_debug);
+ debugfs_remove_recursive(bcache_debug);
}
void __init bch_debug_init(void)