summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2023-07-20 11:33:55 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-03 10:26:13 +0200
commitc5126152c6f627ee25915f5c15d3ab58b3a4d05a (patch)
tree09efbcdc70fe33cc98432f7fc2c64ec7e22a6dfd
parentadce49089412a9ae28f5c666e0bb12fbcd86b3f7 (diff)
downloadlinux-stable-c5126152c6f627ee25915f5c15d3ab58b3a4d05a.tar.gz
linux-stable-c5126152c6f627ee25915f5c15d3ab58b3a4d05a.tar.bz2
linux-stable-c5126152c6f627ee25915f5c15d3ab58b3a4d05a.zip
ceph: never send metrics if disable_send_metrics is set
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 <xiubli@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/ceph/metric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/metric.c b/fs/ceph/metric.c
index c47347d2e84e..9560b7bc6009 100644
--- a/fs/ceph/metric.c
+++ b/fs/ceph/metric.c
@@ -208,7 +208,7 @@ static void metric_delayed_work(struct work_struct *work)
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)) {