Received: by 10.223.176.46 with SMTP id f43csp282634wra; Tue, 23 Jan 2018 21:01:00 -0800 (PST) X-Google-Smtp-Source: AH8x227Z/FcT1k05PkgMe2Za0PRBpX4DP0UlJxHB3oLpnztQrOB0nTFuFnUeWElTdmGtakCtR5mC X-Received: by 10.99.4.198 with SMTP id 189mr10183290pge.210.1516770060622; Tue, 23 Jan 2018 21:01:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516770060; cv=none; d=google.com; s=arc-20160816; b=T9dZyClVso4TW8amO4wjPH2h8hGhGkhESbYlXUZ4PJWSOD8t+578mEujk2JyDYjDrp rqkRK7mj/SP55uyCP1kma9eO2J/jByyrQkIacX1uaxe21vuLuGTlApl5d+NXRE1Sqwnf 6MlFYYx87CtOlaGPnMiS3AnYX0DggSglHWA35EXEfX0uwKhYTJEeAfMCazVyExwx2TaU pCAs7M27llvaWhU1e5l1Wfec4GiF0Fnu/OcyylrBOD8HWRtOu5T4S+14TwDlOwaQhNUo LzGPzWyh+9aiOsN4UvSgCtaYhugs+2s3B1iEOXDJXP9AEWyTZwompT1VT+u9GgU9ebiN cEsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Sii2Fbi1GOvu7baWujXdhf6tTvaYAyXI7iedtI8GtEo=; b=yPefj+8Selun0luT6WBtlzvWV9trxdSvUauD2TUKc3RnJAX1dRiuLjzjzm5e4RbDW3 SdYv/yHmGhnqvDKeI9kN04mdD8/E46qtbeDzhvAKEiOmqnYjpNVO1uFY/Ag7x5VYdV2H pDF4uwX3uG9s13fawbACssu7bNqrCkSEfkE0Y80Zz1umXrATx09ts7WEDCiMNo026TxD Ryufm4u14jY9b9lPlirCrXVEjI4MeqSHImnS1neAX21JRrozHZXIOBqccGylawil1keF Dfl4A3wbH3l6IYkQqBzTgUdswy8uTs+NVlbiIIjYo+OUk3sX8bnGY/B1TyyYAiDwv/El E1Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=H8urKRCu; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w6-v6si5554699plp.738.2018.01.23.21.00.47; Tue, 23 Jan 2018 21:01:00 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=H8urKRCu; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751377AbeAXFAQ (ORCPT + 99 others); Wed, 24 Jan 2018 00:00:16 -0500 Received: from mail-sn1nam01on0111.outbound.protection.outlook.com ([104.47.32.111]:45037 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932114AbeAXEPM (ORCPT ); Tue, 23 Jan 2018 23:15:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Sii2Fbi1GOvu7baWujXdhf6tTvaYAyXI7iedtI8GtEo=; b=H8urKRCuX0TPiYV8g8r1X1CkMz4l1X9S5k5L0YDqZYWQeFvOoAxcO7VY5sDmPw0vAnUXN/CELYSMowmAqi+HIFlxQCSB+phLii9RE0ZpEK6EKBxsa0vK7AyRJrmd2iK8I7yD3/hWhrx1YKVwPAtl02tDCTD2jptH06dSpnEoxc8= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0998.namprd21.prod.outlook.com (52.132.133.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.0; Wed, 24 Jan 2018 04:15:09 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7%2]) with mapi id 15.20.0464.000; Wed, 24 Jan 2018 04:15:09 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Michael Lyle , Jens Axboe , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 032/100] bcache: check return value of register_shrinker Thread-Topic: [PATCH AUTOSEL for 4.14 032/100] bcache: check return value of register_shrinker Thread-Index: AQHTlMnaYzOuYhLb3UydtxbjjkySJQ== Date: Wed, 24 Jan 2018 04:14:39 +0000 Message-ID: <20180124041414.32065-32-alexander.levin@microsoft.com> References: <20180124041414.32065-1-alexander.levin@microsoft.com> In-Reply-To: <20180124041414.32065-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0998;7:xVWAWDtjmjANLcWnvwZcABfjX2jIi3SU5iVJOmY5www/NmA4Z7lKfmiZktqX6IL6jD1eEEkLlILELmsMnhlU/DRXIjXFAFrzn2Ydv3Ls0Qi7qYE+3pRDUMrboinncaG8awlIhuvFYNzzGwgs4G956ageQCier5rcM6ovySaioYTTKM1QJOmlMGXauMM3r26L1vCgGEUs1QHdCWNxU7g3rA2M5nTf7li7b63TZVPIajZ0QVnx5c9ALja6jxhlXpSR x-ms-office365-filtering-correlation-id: e7a1407b-b157-496c-8d0d-08d562e10e93 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603307)(7193020);SRVR:DM5PR2101MB0998; x-ms-traffictypediagnostic: DM5PR2101MB0998: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231046)(2400081)(944501161)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB0998;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0998; x-forefront-prvs: 056297E276 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(39380400002)(346002)(39860400002)(396003)(376002)(199004)(189003)(14454004)(3660700001)(6346003)(10290500003)(105586002)(66066001)(6506007)(8676002)(22452003)(86612001)(54906003)(10090500001)(81166006)(81156014)(76176011)(110136005)(86362001)(68736007)(106356001)(59450400001)(8936002)(3280700002)(36756003)(25786009)(107886003)(2501003)(6666003)(99286004)(2906002)(26005)(2950100002)(72206003)(102836004)(305945005)(6116002)(3846002)(5660300001)(4326008)(478600001)(316002)(53936002)(97736004)(575784001)(2900100001)(5250100002)(6512007)(6436002)(6486002)(1076002)(7736002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0998;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: goe4eCvpuc6vRiNZz+EeqP/Ga66f3vt3MuQnuCpW4ePiHg/CoQ1tFgACNUs3gAPYJUEeaXsAGOXgGcnovTCARA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7a1407b-b157-496c-8d0d-08d562e10e93 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2018 04:14:39.5095 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0998 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/md/bcache/btree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index 658c54b3b07a..1598d1e04989 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -807,7 +807,10 @@ int bch_btree_cache_alloc(struct cache_set *c) c->shrink.scan_objects =3D bch_mca_scan; c->shrink.seeks =3D 4; c->shrink.batch =3D c->btree_pages * 2; - register_shrinker(&c->shrink); + + if (register_shrinker(&c->shrink)) + pr_warn("bcache: %s: could not register shrinker", + __func__); =20 return 0; } --=20 2.11.0