From patchwork Mon Nov 24 15:04:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 413885 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 00A14140081; Tue, 25 Nov 2014 02:10:45 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XsvHk-0000f6-C6; Mon, 24 Nov 2014 15:10:40 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XsvBq-0006SR-QU for kernel-team@lists.ubuntu.com; Mon, 24 Nov 2014 15:04:34 +0000 Received: from bl15-150-46.dsl.telepac.pt ([188.80.150.46] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1XsvBp-0004aq-Dl; Mon, 24 Nov 2014 15:04:33 +0000 From: Luis Henriques To: Wei Yongjun Subject: [3.16.y-ckt stable] Patch "rbd: fix error return code in rbd_dev_device_setup()" has been added to staging queue Date: Mon, 24 Nov 2014 15:04:32 +0000 Message-Id: <1416841472-4450-1-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 2.1.0 X-Extended-Stable: 3.16 Cc: Ilya Dryomov , kernel-team@lists.ubuntu.com, Alex Elder X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled rbd: fix error return code in rbd_dev_device_setup() 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?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue This patch is scheduled to be released in version 3.16.7-ckt2. 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 ------ From 0a62c31b440cd95358cc7c2490b78ac2453835ec Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Wed, 13 Aug 2014 20:49:52 -0700 Subject: rbd: fix error return code in rbd_dev_device_setup() commit 255939e783d8f45f8c58487dfc18957c44ea9871 upstream. Fix to return -ENOMEM from the workqueue alloc error handling case instead of 0, as done elsewhere in this function. Reviewed-by: Alex Elder Signed-off-by: Wei Yongjun Cc: Ilya Dryomov Signed-off-by: Luis Henriques --- drivers/block/rbd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.1.0 diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 453afd257530..5c38fe1f4b85 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -5104,8 +5104,10 @@ static int rbd_dev_device_setup(struct rbd_device *rbd_dev) set_disk_ro(rbd_dev->disk, rbd_dev->mapping.read_only); rbd_dev->rq_wq = alloc_workqueue("%s", 0, 0, rbd_dev->disk->disk_name); - if (!rbd_dev->rq_wq) + if (!rbd_dev->rq_wq) { + ret = -ENOMEM; goto err_out_mapping; + } ret = rbd_bus_add_dev(rbd_dev); if (ret)