summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/closure.c
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2018-03-18 17:36:23 -0700
committerJens Axboe <axboe@kernel.dk>2018-03-18 20:15:20 -0600
commitdf2b94313ae5b4f60d49e01d4dff5acb4c2757cf (patch)
tree124c33fcd0df9753d7c9805c435320bcb89d373a /drivers/md/bcache/closure.c
parentca71df31661a0518ed58a1a59cf1993962153ebb (diff)
downloadblackbird-obmc-linux-df2b94313ae5b4f60d49e01d4dff5acb4c2757cf.tar.gz
blackbird-obmc-linux-df2b94313ae5b4f60d49e01d4dff5acb4c2757cf.zip
bcache: move closure debug file into debug directory
In current code closure debug file is outside of debug directory and when unloading module there is lack of removing operation for closure debug file, so it will cause creating error when trying to reload module. This patch move closure debug file into "bcache" debug direcory so that the file can get deleted properly. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Reviewed-by: Michael Lyle <mlyle@lyle.org> Reviewed-by: Tang Junhui <tang.junhui@zte.com.cn> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/closure.c')
-rw-r--r--drivers/md/bcache/closure.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c
index 7f12920c14f7..c0949c9f843b 100644
--- a/drivers/md/bcache/closure.c
+++ b/drivers/md/bcache/closure.c
@@ -157,7 +157,7 @@ void closure_debug_destroy(struct closure *cl)
}
EXPORT_SYMBOL(closure_debug_destroy);
-static struct dentry *debug;
+static struct dentry *closure_debug;
static int debug_seq_show(struct seq_file *f, void *data)
{
@@ -199,11 +199,12 @@ static const struct file_operations debug_ops = {
.release = single_release
};
-void __init closure_debug_init(void)
+int __init closure_debug_init(void)
{
- debug = debugfs_create_file("closures", 0400, NULL, NULL, &debug_ops);
+ closure_debug = debugfs_create_file("closures",
+ 0400, bcache_debug, NULL, &debug_ops);
+ return IS_ERR_OR_NULL(closure_debug);
}
-
#endif
MODULE_AUTHOR("Kent Overstreet <koverstreet@google.com>");
OpenPOWER on IntegriCloud