From: Zheng Liu <wenqing.lz@xxxxxxxxxx> In bcache_init() function it forgot to unregister reboot notifier if bcache fails to unregister a block device. This commit fixes this. Signed-off-by: Zheng Liu <wenqing.lz@xxxxxxxxxx> --- drivers/md/bcache/super.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index d4713d0..bbb0d45 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -2099,8 +2099,10 @@ static int __init bcache_init(void) closure_debug_init(); bcache_major = register_blkdev(0, "bcache"); - if (bcache_major < 0) + if (bcache_major < 0) { + unregister_reboot_notifier(&reboot); return bcache_major; + } if (!(bcache_wq = create_workqueue("bcache")) || !(bcache_kobj = kobject_create_and_add("bcache", fs_kobj)) || -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html