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

Kamal Mostafa kamal at canonical.com
Fri Jan 29 01:07:45 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.19.y-queue branch of the 3.19.y-ckt extended stable tree 
which can be found at:

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

This patch is scheduled to be released in version 3.19.8-ckt14.

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.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

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

>From e86526100c7cb3c14e8434a9dca18aa697a3d932 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: Kamal Mostafa <kamal 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 9d7b6ee..53f1512 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -2105,8 +2105,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.9.1





More information about the kernel-team mailing list