提交 6f48e238 编写于 作者: S Shenghui Wang 提交者: Greg Kroah-Hartman

bcache: do not check if debug dentry is ERR or NULL explicitly on remove

[ Upstream commit ae17102316550b4b230a283febe31b2a9ff30084 ]

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: NShenghui Wang <shhuiw@foxmail.com>
Signed-off-by: NColy Li <colyli@suse.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 c318f884
......@@ -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(struct kobject *kobj)
......
......@@ -1491,8 +1491,7 @@ static void cache_set_free(struct closure *cl)
struct cache *ca;
unsigned int i;
if (!IS_ERR_OR_NULL(c->debug))
debugfs_remove(c->debug);
debugfs_remove(c->debug);
bch_open_buckets_free(c);
bch_btree_cache_free(c);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册