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 DC7E9200A5 for ; Tue, 1 Aug 2023 09:39:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04A39C433C7; Tue, 1 Aug 2023 09:39:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1690882793; bh=8HpwwKDOchzyf9YRaW2hYZj5dlLXrLKoNrFLKdosg+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cbff9tZo4KD8Fo2byhTz71NwuLQKKTZjZql9/TmKg4R8T/A+1GByKI+AhEyktbOlM mrayKoFDTcdIK71XEPUzoTgf6bFKFF/ocBXrqoDcfCBvLmMqRDSwdHHCX3W628jqxs qJXsWhFbljEsk2LZSqi+qpWz+Wv5ep3eMKPRvzsw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Xiubo Li , Venky Shankar , Jeff Layton , Ilya Dryomov Subject: [PATCH 6.1 211/228] ceph: never send metrics if disable_send_metrics is set Date: Tue, 1 Aug 2023 11:21:09 +0200 Message-ID: <20230801091930.488700837@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230801091922.799813980@linuxfoundation.org> References: <20230801091922.799813980@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Xiubo Li commit 50164507f6b7b7ed85d8c3ac0266849fbd908db7 upstream. Even the 'disable_send_metrics' is true so when the session is being opened it will always trigger to send the metric for the first time. Cc: stable@vger.kernel.org Signed-off-by: Xiubo Li Reviewed-by: Venky Shankar Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman --- fs/ceph/metric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ceph/metric.c +++ b/fs/ceph/metric.c @@ -208,7 +208,7 @@ static void metric_delayed_work(struct w struct ceph_mds_client *mdsc = container_of(m, struct ceph_mds_client, metric); - if (mdsc->stopping) + if (mdsc->stopping || disable_send_metrics) return; if (!m->session || !check_session_state(m->session)) {