Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2634567lqp; Mon, 25 Mar 2024 05:13:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUH5f0N44bhJK+lg5gibbV2lfTa1cEcVAiscRFNIP2Lke+1cJtYrVUzfLZt3EbhjpljXtAKGj6XAQnIuJxg72+TjVKCFdZV351B9qB2tg== X-Google-Smtp-Source: AGHT+IHPuuinzFGJZzLtsDrJbh4nbqvqEL4+hoUDg1V6NtcZEbsF9V/KAEBThDSC2SPCv7MD9r66 X-Received: by 2002:a17:902:d903:b0:1df:ffe3:f787 with SMTP id c3-20020a170902d90300b001dfffe3f787mr7386763plz.48.1711368833264; Mon, 25 Mar 2024 05:13:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711368833; cv=pass; d=google.com; s=arc-20160816; b=lF9W5+g1aM0AS18PyNjqASa6nXH/XihRQ8aQpR8yxlYeDAygVGTs8yD6XrQkcJ0MpY YS69KwsU4oFTcFHRpp5hwKoX26SVMn9hfUD/4pc0xDsCiPlbjuev4A/nUyN/IuoWHZCl X6RRXUZBXkGxnw0Xr1h04oYRyWpAKeneOgEy8lNqqv+LXGSDBNvDeGZIbjVAwmFmX31t fiaIwKaaB33gltnK4JBxT99TZXfGwi1gky7B7bk29kl2DH1cQx5IZ3NKqpdStR/NRVuy H6JyhHPosT4ZIcyybDcDnqR7eCKrxPpXw90mJo76Iqf913eUrTwO1fdKy71/9wsw4jeI JDww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=DvkI7UN9cBvSurMbd8oAstEbL9yKat+6CIxAzYaE9LA=; fh=Kb6YQ8VrHep9lebarjOC/BiHOVn+WRzbTfujAaR8wco=; b=RC7i0X4oWqLVQAPeDvkh7YEUtpG4esJXlzYZp5wRf4HKcwg5mcEJop/g/Yeh3kzvdE KWUbDG/SusMW/s/JbUYl/RkvSlIYAV/0HBt+FnEfMMUHvfQvq1gcJzwoBroYtajZyM2u P0uDKbCHRLKUgwGHDGavaPz66h3+AzuY2OmZqrg4ebsFYwo35rtQ+MlnxRM6ICVc0Vzy x1+9CKBsN4mnwkXaOuyRPwWNwnwoHhihoWkiMew+qaWgKONY9TvPEDuror3wjKehGa3H OeEkI7aKHiZT5ggd+MS7AaQtMyf1LSDPSUx1IXqsxeADyGczFJpnfa8+zRwKoiNmcZYx McZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qCTk7SUS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116334-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b9-20020a170903228900b001e0b8466f16si2582664plh.293.2024.03.25.05.13.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 05:13:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116334-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qCTk7SUS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116334-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8CB372A3EF1 for ; Mon, 25 Mar 2024 12:06:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3192429AE1D; Mon, 25 Mar 2024 03:41:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qCTk7SUS" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C83D296BA9; Sun, 24 Mar 2024 23:52:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324322; cv=none; b=npn15b92koY/rwAb5aIIMK5aS+qujzh7FzUhtba81t6gnvTemMl+L89tQpMGyQTN9iqfESNW0AJyw3vSHuOHT2MySFlJ0L/YtFTi9yeuo88Jvt5FPfJn/8L6mP1P21WgSriXJi/V4dqbjV6/4ADVeJN8LNWVxVVvhhLRwgeHjcs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324322; c=relaxed/simple; bh=v2O7Te2gUiMryxEplDSahEdoCwle9NUThvljuAWldk8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SDZSgaatIH9gRQ2aofSkUKHO9QWZknFCw+XwXS+9pUldofPzepzvnhtwIIBcv+8qOgvSESXwJKd66SIbM3F9vF/FepGEUzzm4nIuKCtm/eQ7eJczspuURzMOd/Y/HDZCQ1QId/9mMOd18+7wZICXgET4eDGIYvU3cEmRJeyuSUo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qCTk7SUS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3A43C43390; Sun, 24 Mar 2024 23:52:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711324322; bh=v2O7Te2gUiMryxEplDSahEdoCwle9NUThvljuAWldk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qCTk7SUSDu0tfaWODCgr7vcmS7OLiUPoK8NQ9k2tmBlm4s67dFBwu3BkAIdO5AfUt cAeyktC2Y5XdHDMtZZcoEZ7T/SPuvYa7nZlu+aQv99gg5two2DxOZSFvbVj6g/w9Ux /z6RLjISKeCA8HLldtfUItBkJihlZ4Ic3jbthBsiWlKiidm0LagJxd/xBC1z2ZW8Ij 23pXJfMnbh7tZc68YKnIceksgnnKXhCJzuobFA5VKqjjfxmT0LvoX5kYDJp8WxImwh yMCrRHxFliPC2h9/aKu17IP8nawfZY9KIjRYuDDR7Fp04rY0LVkEfCEXb7ZJKt5cdE W6QW/KUre+pKA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jiang Biao , Jan Kara , Sasha Levin Subject: [PATCH 4.19 093/148] fs/quota: erase unused but set variable warning Date: Sun, 24 Mar 2024 19:49:17 -0400 Message-ID: <20240324235012.1356413-94-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324235012.1356413-1-sashal@kernel.org> References: <20240324235012.1356413-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jiang Biao [ Upstream commit 78bc3334a69ff289dbc973a9db7c52a2d7757e5b ] Local variable *reserved* of remove_dquot_ref() is only used if define CONFIG_QUOTA_DEBUG, but not ebraced in CONFIG_QUOTA_DEBUG macro, which leads to unused-but-set-variable warning when compiling. This patch ebrace it into CONFIG_QUOTA_DEBUG macro like what is done in add_dquot_ref(). Signed-off-by: Jiang Biao Signed-off-by: Jan Kara Stable-dep-of: 179b8c97ebf6 ("quota: Fix rcu annotations of inode dquot pointers") Signed-off-by: Sasha Levin --- fs/quota/dquot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 683727c5758c0..b55d91d3d87c2 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -1129,7 +1129,9 @@ static void remove_dquot_ref(struct super_block *sb, int type, struct list_head *tofree_head) { struct inode *inode; +#ifdef CONFIG_QUOTA_DEBUG int reserved = 0; +#endif spin_lock(&sb->s_inode_list_lock); list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { @@ -1141,8 +1143,10 @@ static void remove_dquot_ref(struct super_block *sb, int type, */ spin_lock(&dq_data_lock); if (!IS_NOQUOTA(inode)) { +#ifdef CONFIG_QUOTA_DEBUG if (unlikely(inode_get_rsv_space(inode) > 0)) reserved = 1; +#endif remove_inode_dquot_ref(inode, type, tofree_head); } spin_unlock(&dq_data_lock); -- 2.43.0