diff options
author | Shenghui Wang <shhuiw@foxmail.com> | 2018-12-13 22:53:47 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-13 08:15:54 -0700 |
commit | ae17102316550b4b230a283febe31b2a9ff30084 (patch) | |
tree | c75c86901de423e92d0c2f96603277bac8c7372d /drivers/md/bcache/super.c | |
parent | d2f96f487f471b4c718324ecd1540c89d2be52ac (diff) | |
download | lwn-ae17102316550b4b230a283febe31b2a9ff30084.tar.gz lwn-ae17102316550b4b230a283febe31b2a9ff30084.zip |
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/super.c')
-rw-r--r-- | drivers/md/bcache/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 7bbd670a5a84..5b59d44656c0 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1510,8 +1510,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); |