* [PATCH] bcache: unregister reboot notifier when bcache fails to register a block device
@ 2015-02-03 11:23 Joshua Schmid
0 siblings, 0 replies; 2+ messages in thread
From: Joshua Schmid @ 2015-02-03 11:23 UTC (permalink / raw)
To: linux-bcache; +Cc: Zheng Liu
From: Zheng Liu <wenqing.lz@taobao.com>
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@taobao.com>
Tested-by: Joshua Schmid <jschmid@suse.com>
---
drivers/md/bcache/super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index f624ae8..8c2d657 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -2102,8 +2102,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)) ||
--
2.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] bcache: unregister reboot notifier when bcache fails to register a block device
@ 2014-10-18 13:13 Zheng Liu
0 siblings, 0 replies; 2+ messages in thread
From: Zheng Liu @ 2014-10-18 13:13 UTC (permalink / raw)
To: linux-bcache; +Cc: Zheng Liu
From: Zheng Liu <wenqing.lz@taobao.com>
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@taobao.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-03 11:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03 11:23 [PATCH] bcache: unregister reboot notifier when bcache fails to register a block device Joshua Schmid
-- strict thread matches above, loose matches on Subject: below --
2014-10-18 13:13 Zheng Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.