From patchwork Fri Oct 13 23:35:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Lyle X-Patchwork-Id: 10006125 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8DCF66037E for ; Fri, 13 Oct 2017 23:36:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E0D32918B for ; Fri, 13 Oct 2017 23:36:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 701C729009; Fri, 13 Oct 2017 23:36:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4E3D29009 for ; Fri, 13 Oct 2017 23:36:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752942AbdJMXgH (ORCPT ); Fri, 13 Oct 2017 19:36:07 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:50647 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753192AbdJMXgE (ORCPT ); Fri, 13 Oct 2017 19:36:04 -0400 Received: by mail-pf0-f196.google.com with SMTP id b6so3103986pfh.7 for ; Fri, 13 Oct 2017 16:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyle-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qY9G4ipJ8TOysihAs6U6aqMOcghFYvMLq5bx9TWYm/A=; b=zUANEDAFcufzIo8i5rFhdT/wzHPMiw/KxFAboXYdqDoM0hrK50O09tlw3COfErvQtn +xR3oo3XCuXnEDr0mPZQXWN6/NLjBanar6MgPWyZr++euYR8Sn35OcmgnST9+2QyNiwL ZG8BXYdcZPXcH0Q6fessuAnbZYvTZEl34gdU2XSE/nYIDBh9FmyFrO4cRrkdg4+BahaZ Wfy4WWKuzkz4Ki6ce0XQgssl/Rc7Hum8Da6mWLexGBe/+nTrwNzSVCMTVEvQOPs5oxPS V6GjiBihFbBkONtY6gh7aC32boYbLjbduwAexWN/LmBaMiAAjhWtbHMLMH2wQvcOwVwD D6Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qY9G4ipJ8TOysihAs6U6aqMOcghFYvMLq5bx9TWYm/A=; b=PiZ2wccME+XmdCISyQeBafu2mrOPeSbZm6E/4b72vwcWdQkhoSv8VD+zPvA5+BPM1X BnewFvWJD2uJhifrfMNZp1quozf46Hv7WrZdfQj9fMX49RJsb7Oa2AcN7ZwWwnnrofWv 5OmuL7un1Lz9OQpD2o0Az/wyFVRA1FmdC1g4wwm2z++Ic43QumIRc7W8Mg3D2anxiTkw iKxKgBYIKMPP7NwAZDBAWpqLljNlyG3wnSi4gHBMWxIQ1/d9gPaRPdLv0nszkJ4Nxars rvA1IGI9CqUfFg/eD5l4e8X0Wx0+ubBCnxtJepOV2QmIh9sEi9GQeCWC/+JtqI+Jtlit hpvg== X-Gm-Message-State: AMCzsaWQHFLeEHGBhVnhbYz90WQYoPPlVaa2VNVH+loG0asiPB9B0Jra u4cgvx1OYbjkK5iKTEqzTcaGoNQMc3Y= X-Google-Smtp-Source: AOwi7QBRs6pVWOzymZD98bJ7OjGtM4aUm/uf7dSxNpvNXfEscMyfIdaSI3dOKctOP1XD4ouMrXja/A== X-Received: by 10.84.232.138 with SMTP id i10mr2790072plk.104.1507937763503; Fri, 13 Oct 2017 16:36:03 -0700 (PDT) Received: from localhost.localdomain (68-189-67-104.dhcp.prtv.ca.charter.com. [68.189.67.104]) by smtp.gmail.com with ESMTPSA id 74sm4950718pft.184.2017.10.13.16.36.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Oct 2017 16:36:03 -0700 (PDT) From: Michael Lyle To: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org Cc: axboe@fb.com, Yijing Wang Subject: [PATCH 05/15] bcache: Remove redundant set_capacity Date: Fri, 13 Oct 2017 16:35:32 -0700 Message-Id: <20171013233542.20938-6-mlyle@lyle.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171013233542.20938-1-mlyle@lyle.org> References: <20171013233542.20938-1-mlyle@lyle.org> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yijing Wang set_capacity() has been called in bcache_device_init(), remove the redundant one. Signed-off-by: Yijing Wang Reviewed-by: Eric Wheeler Acked-by: Coly Li --- drivers/md/bcache/super.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index a478d1ac0480..72c3b2929ef0 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1142,9 +1142,6 @@ static int cached_dev_init(struct cached_dev *dc, unsigned block_size) if (ret) return ret; - set_capacity(dc->disk.disk, - dc->bdev->bd_part->nr_sects - dc->sb.data_offset); - dc->disk.disk->queue->backing_dev_info->ra_pages = max(dc->disk.disk->queue->backing_dev_info->ra_pages, q->backing_dev_info->ra_pages);