Received: by 10.223.176.5 with SMTP id f5csp1057202wra; Fri, 2 Feb 2018 10:25:37 -0800 (PST) X-Google-Smtp-Source: AH8x227uNtAW4ieCfmuvhqwRbRTpQ9NYx/gbA2h8GgJUxYXpCzc4axo+Ou1+gu2Gj4LrGfQG4MhD X-Received: by 2002:a17:902:5902:: with SMTP id o2-v6mr35489884pli.79.1517595936933; Fri, 02 Feb 2018 10:25:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517595936; cv=none; d=google.com; s=arc-20160816; b=vWctMNDXGc0jgM3Mc51VIM9Vcw4A4zZuyc701oG8guIellAQa+3DYGhNN4PA/n9CQK 8/bjw5DnK9YfU325XZ/96iD1k6X7zp63tlKQiMqbTnQD4C5jXeUfh8l84iW8iukMdWrp 6RO6f8740B9de/lYc0vSlcZMYwEptdQj+lmrw7Dpcu/iHIWdDIJoLSN1mrCMBBRZi2WX /Bzu0GAdgcgzCLIJY2vv4VeaeHgNDIDoZ/GNHJQsHR/kFeqHWZ/XGSuCXbzaZGSy5qok oYXDcPXLzdQNZ2i0qp12S8nWpqHrBRHWx8udXIQuM/Es1Lpysn+/Z+sL24KMFXGC0eaW 5MyA== 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=P0sc+ReApK0w8sJmDN5lf0YAFiYPJWZeJ9AmubF9s6Q=; b=raim4/OZmW+X+yM/Z7X7vQPkANRu+UpGphM8JNJrMAyw+oDOG9qm7iKSKgikBLFg/V EXpBzJP727SkS3IhJflhhb0ENcM/5KGV6SDB4GHaVoVc+YC/a6oUSbysYROa9h2Da8wH pyReB2Ol2q34nrKqlWVrRX+3Y+4HMznjMQUQScTJFHsmkBSZMk6r/t30QqtWnl07U8g2 y20heDoImNLgAw4ONEBgapLFOje6+6Zcs356L8ZR85IU6WMXUlhU4mNbG04rJh8vVZCh dmnrbJxKSZ0UmzHVrmuScCEUCCVCBxHEE568h5xPyn+TKMxOkRb1Vc7d1z5pkT9R3u1b Pn/w== 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 t69si170671pgd.620.2018.02.02.10.25.21; Fri, 02 Feb 2018 10:25:36 -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 S1752446AbeBBSYc (ORCPT + 99 others); Fri, 2 Feb 2018 13:24:32 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35350 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752290AbeBBRCK (ORCPT ); Fri, 2 Feb 2018 12:02:10 -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 EFEF9E5E; Fri, 2 Feb 2018 17:02:09 +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.4 29/67] bcache: check return value of register_shrinker Date: Fri, 2 Feb 2018 17:57:58 +0100 Message-Id: <20180202140818.815534462@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140815.091718203@linuxfoundation.org> References: <20180202140815.091718203@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.4-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 @@ -808,7 +808,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; }