Skip to contentSkip to conversation

Patch "bcache: unregister reboot notifier if bcache fails to unregister device" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Mar 1, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

bcache: unregister reboot notifier if bcache fails to unregister device

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
bcache-unregister-reboot-notifier-if-bcache-fails-to-unregister-device.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 2ecf0cdb2b437402110ab57546e02abfa68a716b Mon Sep 17 00:00:00 2001

From: Zheng Liu <[email protected]>
Date: Sun, 29 Nov 2015 17:21:57 -0800
Subject: bcache: unregister reboot notifier if bcache fails to unregister device

From: Zheng Liu <[email protected]>

commit 2ecf0cdb2b437402110ab57546e02abfa68a716b upstream.

In bcache_init() function it forgot to unregister reboot notifier if bcache fails to unregister a block device. This commit fixes this.

---
 drivers/md/bcache/super.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/md/bcache/super.c +3 -1
@@ -2071,8 +2071,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)) ||

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/bcache-clear-bcache_dev_unlink_done-flag-when-attaching-a-backing-device.patch queue-4.4/bcache-fix-a-livelock-when-we-cause-a-huge-number-of-cache-misses.patch queue-4.4/bcache-unregister-reboot-notifier-if-bcache-fails-to-unregister-device.patch