Received: by 10.223.176.5 with SMTP id f5csp1036024wra; Fri, 2 Feb 2018 10:04:32 -0800 (PST) X-Google-Smtp-Source: AH8x225qZAKABbtj1QE+srmNCbwWYEziHW8kwIbsF87M/eAUmAPKngLYq7ysxH7bkcGdWLSs7Ubb X-Received: by 2002:a17:902:650e:: with SMTP id b14-v6mr35432166plk.451.1517594672078; Fri, 02 Feb 2018 10:04:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517594672; cv=none; d=google.com; s=arc-20160816; b=lRAfA7Efmzpp0DBlx0lRYDil0WdF+5rr0bSo0aMKfMA9vTy7lR58RPJaOLx6VmRHkl J7klp/lvwuQ8JAUVeUBNH07vxkjjDAjj3GdMtjEh7/KRcqkYZR7zXd+JdG3bE0m3bV/N gqLyWsK0gqrYMxsPnHzliYw8pPetVeMsXtKbyByYAXBqbXmgotRt3LX6IQuI5NWt+tPa AJXl00XLWEdc5KhFId6DSOlmNYGKmR0DZlUDy0b3KGGrM2PEWAUp/vIK7AEuYUYVlzCC ywt6eFuocWb46sFhy3rHkUjmjidSKt3CacrckR4YugrXMC9gNctE9ZWhJyQ76SgP1V6j 2s1w== 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=IcNeQ7Ke8ZyZ+BMEmB7NRoyNv4but60xLPzLDOTOXuw=; b=TGdUF96sopYCKZiaBaQ2SFJQCOAhONUY1ifcxql8fqwigylpv5zmkuARmZpaFSqK4Q 0hVVhXpmpo8AzK4y7ZLX0tcnFLOtbkjafqPpAnFWJD17pO8frhf2mMx69j+llPJPC78S YCk1EIrSgxpwYBDL2DD4EsZo9kimbIdU0bValrKYUS4zF27iJlPOzybcjQxmjGe7AHNL BxRCOLC6blGwZWoMymCS5HtxNza/LP45EbjOJEltMAMiUXLTqGt6N70tGjm5HaiJ1uJH 00T3R8/SruQ+L0OXTW3kwRETK8BFUOypTMhGdz5OEkNQQpVNpZ5amp3HKbkAQfyPSydm my5A== 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 s2si1428pgc.386.2018.02.02.10.04.16; Fri, 02 Feb 2018 10:04:32 -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 S1753780AbeBBSAo (ORCPT + 99 others); Fri, 2 Feb 2018 13:00:44 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38056 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752634AbeBBRJt (ORCPT ); Fri, 2 Feb 2018 12:09: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 A6B34EA0; Fri, 2 Feb 2018 17:09:47 +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.14 061/156] bcache: check return value of register_shrinker Date: Fri, 2 Feb 2018 17:57:22 +0100 Message-Id: <20180202140843.061297415@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@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.14-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 @@ -807,7 +807,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; }