From patchwork Wed Mar 27 03:20:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10872459 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1335F139A for ; Wed, 27 Mar 2019 03:08:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED8EC28C6A for ; Wed, 27 Mar 2019 03:08:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E222928C6C; Wed, 27 Mar 2019 03:08:48 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 71D7A28C7A for ; Wed, 27 Mar 2019 03:08:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732651AbfC0DIq (ORCPT ); Tue, 26 Mar 2019 23:08:46 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:48106 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732617AbfC0DIq (ORCPT ); Tue, 26 Mar 2019 23:08:46 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 13E93EDCC689C7A7E2CF; Wed, 27 Mar 2019 11:08:44 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.408.0; Wed, 27 Mar 2019 11:08:34 +0800 From: YueHaibing To: Chris Mason , Josef Bacik , David Sterba CC: YueHaibing , , Subject: [PATCH -next] btrfs: remove set but not used variable 'fs_devices' Date: Wed, 27 Mar 2019 03:20:24 +0000 Message-ID: <20190327032024.63906-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: fs/btrfs/volumes.c: In function 'btrfs_grow_device': fs/btrfs/volumes.c:2824:27: warning: variable 'fs_devices' set but not used [-Wunused-but-set-variable] It's not used after 6f32a50a232b ("btrfs: combine device update operations during transaction commit") Signed-off-by: YueHaibing --- fs/btrfs/volumes.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index afafc92e70e9..605230482009 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2821,7 +2821,6 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans, { struct btrfs_fs_info *fs_info = device->fs_info; struct btrfs_super_block *super_copy = fs_info->super_copy; - struct btrfs_fs_devices *fs_devices; u64 old_total; u64 diff; @@ -2840,8 +2839,6 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans, return -EINVAL; } - fs_devices = fs_info->fs_devices; - btrfs_set_super_total_bytes(super_copy, round_down(old_total + diff, fs_info->sectorsize)); device->fs_devices->total_rw_bytes += diff;