From mboxrd@z Thu Jan 1 00:00:00 1970 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 30AED30FA7 for ; Wed, 20 Sep 2023 12:28:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA067C433C7; Wed, 20 Sep 2023 12:28:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1695212905; bh=rW5AejsTdPskUSd+2xZda7Ra2vh5RtNl7dz5jq2WGJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mAZSYcgeOgOSczzB+BWNTakLbgL005f1sLeO/LIk984CCA3yqQxI7gxjZmMDZFIp6 uMKPWx59rqTjIwSfxREZ/Pl0HFfF2n0v+JqRZXu9lfRq9LQ07QJRqo+3fPs1Tf25bK V+rGLvlYepzFoE0VjmdOsVwq+yt7N3rrsAOxOzhs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Chengguang Xu , Jan Kara , Sasha Levin Subject: [PATCH 5.4 088/367] quota: avoid increasing DQST_LOOKUPS when iterating over dirty/inuse list Date: Wed, 20 Sep 2023 13:27:45 +0200 Message-ID: <20230920112900.821417935@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230920112858.471730572@linuxfoundation.org> References: <20230920112858.471730572@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chengguang Xu [ Upstream commit 05848db2083d4f232e84e385845dcd98d5c511b2 ] It is meaningless to increase DQST_LOOKUPS number while iterating over dirty/inuse list, so just avoid it. Link: https://lore.kernel.org/r/20190926083408.4269-1-cgxu519@zoho.com.cn Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara Stable-dep-of: dabc8b207566 ("quota: fix dqput() to follow the guarantees dquot_srcu should provide") Signed-off-by: Sasha Levin --- fs/quota/dquot.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 5361e6bc397d0..5b887fb1aa71a 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -595,7 +595,6 @@ int dquot_scan_active(struct super_block *sb, /* Now we have active dquot so we can just increase use count */ atomic_inc(&dquot->dq_count); spin_unlock(&dq_list_lock); - dqstats_inc(DQST_LOOKUPS); dqput(old_dquot); old_dquot = dquot; /* @@ -650,7 +649,6 @@ int dquot_writeback_dquots(struct super_block *sb, int type) * use count */ dqgrab(dquot); spin_unlock(&dq_list_lock); - dqstats_inc(DQST_LOOKUPS); err = sb->dq_op->write_dquot(dquot); if (err) { /* -- 2.40.1