Received: by 10.223.176.5 with SMTP id f5csp1054155wra; Fri, 2 Feb 2018 10:22:15 -0800 (PST) X-Google-Smtp-Source: AH8x225+KmBphbk5eLSnItD1a+KE7U/StbvZcxqahA9vkvuftrGqi/gEjoPR5GXAZUXhnRc6ejp7 X-Received: by 10.98.11.201 with SMTP id 70mr3137897pfl.16.1517595735758; Fri, 02 Feb 2018 10:22:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517595735; cv=none; d=google.com; s=arc-20160816; b=Q6NjCcnS2Dk8jHIKRAonyJYA7WoP1QqCHZLYSkf/WiPvRSvzfpV2xhv5dWNZFwqWZ4 /GB9cuHiTiVTkqdfdiE90HfImCsGr+LIbBYb/0DQMEFqhR9gONre2qoKdPbCMqXVb5Zd I2rxVwLKQiFp3ErQ7cUF9p04jOg+qb+MR8gBvoUfnZ1kiYXw7M3/F6bR++SbiFfwCHUx xClKKLM+ol+cTu3ZjfvL4zbTm9I8phVMjaYWCZR2JQzfdKLG71xa2nIlmi2lQfoAWaYh kUYZ+KuOr37eohRZmJUVxVwBUE1u5kFu9Qbzq4Qk45BocsM6SxWVuALJ5X056/W1pVzR 318Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=QpTiy4RLpLMsRJrs6Ze/I8o1Gaiy35ZS9NIMi1/AJCw=; b=v17Vg4Wj/uLYjq5oZGrGbqArglQZ1l5q5dsFVYysw36auNjDSOtXZ9wSe+5EIsOuqc qTWtcWJdyw3K9wm5CN6f4P8ajw6MHdJAmLEf7VLb+eV5iX3dlkUtQe9GAleCjoVM5npt ikfEpkGiMrmoSF6FldvKzlCdskNSRv74CYdqRE8LpY8I2naR8T/Dm+raGwtkz9cLFLXB eL2raVEfTSWEEHZStwcHjtebLdlt2l3ueJkzVo9QDN4xbXkFeAQEG5j1FfIXF3f294vH vCO6JDhNpBpAzRVHRaFzS4w3slWLr/u6SHfVnmJntHmjgzFmMSsYhVlko9LQPYmCUP4P NoFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x185si52163pgx.159.2018.02.02.10.22.00; Fri, 02 Feb 2018 10:22:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754363AbeBBSVA (ORCPT + 99 others); Fri, 2 Feb 2018 13:21:00 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35872 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752824AbeBBRDt (ORCPT ); Fri, 2 Feb 2018 12:03:49 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 633F87A8; Fri, 2 Feb 2018 17:03:48 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Lyle , Vojtech Pavlik , Jens Axboe , Sasha Levin Subject: [PATCH 4.9 28/86] bcache: check return value of register_shrinker Date: Fri, 2 Feb 2018 17:57:48 +0100 Message-Id: <20180202140825.175201232@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140822.679101338@linuxfoundation.org> References: <20180202140822.679101338@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Lyle [ Upstream commit 6c4ca1e36cdc1a0a7a84797804b87920ccbebf51 ] register_shrinker is now __must_check, so check it to kill a warning. Caller of bch_btree_cache_alloc in super.c appropriately checks return value so this is fully plumbed through. This V2 fixes checkpatch warnings and improves the commit description, as I was too hasty getting the previous version out. Signed-off-by: Michael Lyle Reviewed-by: Vojtech Pavlik Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/md/bcache/btree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -803,7 +803,10 @@ int bch_btree_cache_alloc(struct cache_s c->shrink.scan_objects = bch_mca_scan; c->shrink.seeks = 4; c->shrink.batch = c->btree_pages * 2; - register_shrinker(&c->shrink); + + if (register_shrinker(&c->shrink)) + pr_warn("bcache: %s: could not register shrinker", + __func__); return 0; }