From patchwork Fri Nov 25 01:39:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 84018 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp297470qgi; Thu, 24 Nov 2016 17:37:51 -0800 (PST) X-Received: by 10.99.138.75 with SMTP id y72mr9439715pgd.90.1480037871319; Thu, 24 Nov 2016 17:37:51 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m27si13208256pli.219.2016.11.24.17.37.50; Thu, 24 Nov 2016 17:37:51 -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 S1751237AbcKYBhp (ORCPT + 25 others); Thu, 24 Nov 2016 20:37:45 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:40237 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750833AbcKYBho (ORCPT ); Thu, 24 Nov 2016 20:37:44 -0500 Received: from 172.24.1.136 (EHLO SZXEML424-HUB.china.huawei.com) ([172.24.1.136]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DVR03591; Fri, 25 Nov 2016 09:37:37 +0800 (CST) Received: from 138.huawei.com (10.175.124.28) by SZXEML424-HUB.china.huawei.com (10.82.67.153) with Microsoft SMTP Server id 14.3.235.1; Fri, 25 Nov 2016 09:37:07 +0800 From: Yijing Wang To: , CC: , , , , Yijing Wang Subject: [PATCH 1/2] bcache: Remove redundant set_capacity Date: Fri, 25 Nov 2016 09:39:29 +0800 Message-ID: <1480037969-45042-1-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org set_capacity() has been called in bcache_device_init(), remove the redundant one. Signed-off-by: Yijing Wang --- drivers/md/bcache/super.c | 3 --- 1 file changed, 3 deletions(-) -- 2.5.0 Acked-by: Coly Li Reviewed-by: Eric Wheeler diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 849ad44..b638a16 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1126,9 +1126,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);