From patchwork Wed Aug 8 04:35:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 10559499 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 836B714C0 for ; Wed, 8 Aug 2018 04:28:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 643962A2EA for ; Wed, 8 Aug 2018 04:28:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55A752A2EC; Wed, 8 Aug 2018 04:28:57 +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 0D65D2A2EA for ; Wed, 8 Aug 2018 04:28:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726724AbeHHGqI (ORCPT ); Wed, 8 Aug 2018 02:46:08 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:48725 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726538AbeHHGqH (ORCPT ); Wed, 8 Aug 2018 02:46:07 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 17CB081C4384C; Wed, 8 Aug 2018 12:28:23 +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.399.0; Wed, 8 Aug 2018 12:28:14 +0800 From: Wei Yongjun To: Alexander Viro , David Howells CC: Wei Yongjun , , Subject: [PATCH -next] statfs: remove set but not used variable 'sb' Date: Wed, 8 Aug 2018 04:35:42 +0000 Message-ID: <1533702942-166827-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: fs/statfs.c: In function 'fsinfo_generic_statfs': fs/statfs.c:406:22: warning: variable 'sb' set but not used [-Wunused-but-set-variable] struct super_block *sb; ^ Fixes: 90b413cb970a ("vfs: syscall: Add fsinfo() to query filesystem information") Signed-off-by: Wei Yongjun --- fs/statfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/statfs.c b/fs/statfs.c index 2f3f2d5..f714f05 100644 --- a/fs/statfs.c +++ b/fs/statfs.c @@ -403,7 +403,6 @@ int kcompat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct compat_statf static int fsinfo_generic_statfs(struct dentry *dentry, struct fsinfo_statfs *p) { - struct super_block *sb; struct kstatfs buf; int ret; @@ -411,7 +410,6 @@ static int fsinfo_generic_statfs(struct dentry *dentry, if (ret < 0) return ret; - sb = dentry->d_sb; p->f_blocks = buf.f_blocks; p->f_bfree = buf.f_bfree; p->f_bavail = buf.f_bavail;