Commit ae171023 authored by Shenghui Wang's avatar Shenghui Wang Committed by Jens Axboe
Browse files

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: default avatarShenghui Wang <shhuiw@foxmail.com>
Signed-off-by: default avatarColy Li <colyli@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d2f96f48
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -249,7 +249,6 @@ 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);
}

+1 −2
Original line number Diff line number Diff line
@@ -1510,7 +1510,6 @@ 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);

	bch_open_buckets_free(c);