bcache: move closure debug file into debug directory
[sfrench/cifs-2.6.git] / drivers / md / bcache / debug.c
index af89408befe847a25164cc34b46d0cd941294ace..028f7b386e014b6bae1bf1dc5d8b9f687faa0746 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/random.h>
 #include <linux/seq_file.h>
 
-static struct dentry *debug;
+struct dentry *bcache_debug;
 
 #ifdef CONFIG_BCACHE_DEBUG
 
@@ -232,11 +232,11 @@ static const struct file_operations cache_set_debug_ops = {
 
 void bch_debug_init_cache_set(struct cache_set *c)
 {
-       if (!IS_ERR_OR_NULL(debug)) {
+       if (!IS_ERR_OR_NULL(bcache_debug)) {
                char name[50];
                snprintf(name, 50, "bcache-%pU", c->sb.set_uuid);
 
-               c->debug = debugfs_create_file(name, 0400, debug, c,
+               c->debug = debugfs_create_file(name, 0400, bcache_debug, c,
                                               &cache_set_debug_ops);
        }
 }
@@ -245,13 +245,13 @@ void bch_debug_init_cache_set(struct cache_set *c)
 
 void bch_debug_exit(void)
 {
-       if (!IS_ERR_OR_NULL(debug))
-               debugfs_remove_recursive(debug);
+       if (!IS_ERR_OR_NULL(bcache_debug))
+               debugfs_remove_recursive(bcache_debug);
 }
 
 int __init bch_debug_init(struct kobject *kobj)
 {
-       debug = debugfs_create_dir("bcache", NULL);
+       bcache_debug = debugfs_create_dir("bcache", NULL);
 
-       return IS_ERR_OR_NULL(debug);
+       return IS_ERR_OR_NULL(bcache_debug);
 }