From patchwork Wed Oct 10 14:27:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 148555 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp931608lji; Wed, 10 Oct 2018 07:28:25 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Ts/XfYM4UtuN5/4LbaecZxuAJOFQ+S9DrHBwPFIE09f8N34q6M19IDv7nh5QAmNxbD9Yd X-Received: by 2002:a63:bd01:: with SMTP id a1-v6mr13301870pgf.58.1539181705263; Wed, 10 Oct 2018 07:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539181705; cv=none; d=google.com; s=arc-20160816; b=gD3Ogju2P+YB9TL7jxunCMs8YietqGEUFvXYpkhVFae8XPlUTUlQySzPXfMJ0fXIIW 2sMDISejJ+rFpJMSLOdACDzyW7asOQIIX/4gvt/qtIHj9BNajW6jRQjpybP5L/xbA5x4 seegbYxpa/BHML4PNUs2bl/26dBRwUF8Yns1S507wiAMNLn6ZunHbP8MKSX6skldiD6m 9DKsTc52akHT3qrsYHqstpBLih7hBw1pHGAHJzQExvhlaVCG19zxMaK9Feb2G3w8OO4K 7HuuebFDr21/KEs7+uLbQAe5hz5S7LlAcJskQYaV3x+7NSi3gtOorynLe3LkMllNUK2t 3IPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=fZ6c0SsskPAHPTPD6dX3mdApboz3r3E1SwhaE6BBP2s=; b=bD0xWfBpweo3GisMU8mT14T+RVyR+XkY8k/pfCSCTuQIv7EwH30a4F+ewPN3JefJxr C5BHX62vQMm+vmP6p7ejVFhS/4b1CgLi4UsQRg3A3T6wGcx60c8vJExC8qX9jRQkf/gg xjQKh+6f+65uHJibEEaKH0YdujsBTpdCIGTo7kIhUTSU7Z6aUT59aybCnNdoJfR2OId7 rVm8Os/ovwuKc707lZXF1X6xXLlLeb4YoKkIyWakasTdLZSiksxTJch3kzZAbVLUUSLX f7BrJ5T+JCh1VkWG53PYKg6eDseBRis36NU5TdCeyIC8rNCe5keMEp9f7nokz6mIAbdx uhYw== 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 y12-v6si19905800pfl.255.2018.10.10.07.28.24; Wed, 10 Oct 2018 07:28:25 -0700 (PDT) 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 S1727375AbeJJVut (ORCPT + 32 others); Wed, 10 Oct 2018 17:50:49 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:37645 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbeJJVus (ORCPT ); Wed, 10 Oct 2018 17:50:48 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MXpQA-1gBSIF3kzM-00Y75n; Wed, 10 Oct 2018 16:28:16 +0200 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MXpQA-1gBSIF3kzM-00Y75n; Wed, 10 Oct 2018 16:28:16 +0200 From: Arnd Bergmann To: "Theodore Ts'o" , Andreas Dilger Cc: Arnd Bergmann , Jan Kara , Eric Biggers , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ext4: avoid unused variable warning Date: Wed, 10 Oct 2018 16:27:58 +0200 Message-Id: <20181010142813.1918180-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:2Ddw13HeTrQQBUtKVjTSl/urr2EjV8KBDC1s+JJ7P21ofjDeJZv EcjMlb3eMYy7QG0x/alBZL6+fGGdWuY91LiI7DbPBN3NiHbH+fCmvPFWfiiOZZWltERXVfg JFH64PH/HxFzsvza5cFZd79z0QFkQ0O2LAFreECxN1yvL3bm6KacX6cTQQB77W+I55OMes2 rQycT/vW4vaqHRmgFCI9A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V01:K0:zq2JKL5SPsE=:zw8u89C2XDlw0s0KYO9iUf TkjdKfb5gzT3uTQOxuuFF7KL7SqIphRstwZ/TJDJY9bQIPLxCQHZMFU3F6kz5WQnXoZ3aCm5c OwW1r+bqx1rbbeL8nxPzxEc2TZg8ikbM+ia5wBariGQDNgITBopksUrNkDmn+QbFzP3kFiIOe PKfy0KF9LhnMqO6argGAPaCG77tLJhbszXeFbI/VsaDiD0jJefLlz3p1oPIDZO16zOTir6cpy pnHlKsejUpXenDF2GAy0B44WUM5vRafPdHmEldCpO+lu+RFMAvjmB7Ffd8v/uNipaB1SDiaHn /pxQ0JMjpCebd+vOm+bTqT7u8GnNhGbRtsmfuDKHIw+vGB1qzvFAQ689S9b7CYvrxwtRi2Qny rhUJT4JrfOmw+yQJ3SlCVMkn9xWLV5ARkhpFIb6PJJhsMtacdOOOjy1W2h1CsQD+AX8fxnt4Y XNH34xBi2bGq0ouQpmJ0Ce4GpE+bBDSj1uDHxhIpABifWgJPNFPxkuYNX4ONIHdytuzweJtyF NZz7UCKmoIjbx5slUD0BeN40nKC1b+dJ3aGdv0VYctRVJaM0Eruwp7omfesB9iIwG+ZzUvsJ6 41ICwcm3wnFjn8L7fQAy/wBBf81QodM/AJRRMden3v33JMyeV+8weNFQS5Vdkn3kluosQdU/M LfbjnLh/C24CBiTKibCvXhLYwGHfMDx2jXq1CfbY7AgQ+hdc1KyUYfMuo599dep/XAVM= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The two new variables are only used in an #ifdef, so they cause a warning without CONFIG_QUOTA: fs/ext4/super.c: In function 'parse_options': fs/ext4/super.c:1977:26: error: unused variable 'grp_qf_name' [-Werror=unused-variable] char *p, *usr_qf_name, *grp_qf_name; ^~~~~~~~~~~ fs/ext4/super.c:1977:12: error: unused variable 'usr_qf_name' [-Werror=unused-variable] char *p, *usr_qf_name, *grp_qf_name; Fixes: 20cefcdc2040 ("ext4: fix use-after-free race in ext4_remount()'s error path") Signed-off-by: Arnd Bergmann --- fs/ext4/super.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.18.0 diff --git a/fs/ext4/super.c b/fs/ext4/super.c index e9ca8312457b..d60199510c94 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1974,7 +1974,10 @@ static int parse_options(char *options, struct super_block *sb, int is_remount) { struct ext4_sb_info *sbi = EXT4_SB(sb); - char *p, *usr_qf_name, *grp_qf_name; + char *p; +#ifdef CONFIG_QUOTA + char *usr_qf_name, *grp_qf_name; +#endif substring_t args[MAX_OPT_ARGS]; int token;