[3.16.y-ckt stable] Patch "bcache: unregister reboot notifier if bcache fails to unregister device" has been added to the 3.16.y-ckt tree

Luis Henriques luis.henriques at canonical.com
Wed Feb 3 13:58:41 UTC 2016


This is a note to let you know that I have just added a patch titled

    bcache: unregister reboot notifier if bcache fails to unregister device

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt24.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

---8<------------------------------------------------------------

>From e43ebd523e6ee590c6f8670fbf09257ffd6f6cb3 Mon Sep 17 00:00:00 2001
From: Zheng Liu <wenqing.lz at taobao.com>
Date: Sun, 29 Nov 2015 17:21:57 -0800
Subject: bcache: unregister reboot notifier if bcache fails to unregister
 device

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.

Signed-off-by: Zheng Liu <wenqing.lz at taobao.com>
Tested-by: Joshua Schmid <jschmid at suse.com>
Tested-by: Eric Wheeler <bcache at linux.ewheeler.net>
Cc: Kent Overstreet <kmo at daterainc.com>
Signed-off-by: Jens Axboe <axboe at fb.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.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 4a5356879914..04506f7189e7 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -2087,8 +2087,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)) ||




More information about the kernel-team mailing list