From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756174AbcCBBMg (ORCPT ); Tue, 1 Mar 2016 20:12:36 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:48096 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755691AbcCAXzr (ORCPT ); Tue, 1 Mar 2016 18:55:47 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=hPgXFC1SDuczu3hhaQI4gnYHPS8jl/qvAuQa+FUBcTGjTqa6zFKn1WtQHuJwxi3Pfdp6rAs87zrq j11wKiyNfdgixFkoE49iNZ6fh8IHLfAzVirR2SgoeH7Tulo1bEYL+EOsHwpKEv0bASh4OWszWVbJ 83SuEejfHJI+iNSS22s=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 066/342] bcache: unregister reboot notifier if bcache fails to unregister device X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Zheng Liu , Joshua Schmid , Eric Wheeler , Kent Overstreet , Jens Axboe Message-Id: <20160301234530.133753948@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.a8f06e01c0a341208f78734bddcea313 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:54:06 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zheng Liu 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 Tested-by: Joshua Schmid Tested-by: Eric Wheeler Cc: Kent Overstreet Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/md/bcache/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -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)) ||