From: Kent Overstreet Date: Sun, 24 Dec 2023 03:55:05 +0000 (-0500) Subject: bcachefs: fix warning about uninitialized time_stats X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ef23397c301900e9e7050f8245e2a25b5eea1589;p=linux.git bcachefs: fix warning about uninitialized time_stats Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c index 00ddd91ddfcc8..d530277f9017a 100644 --- a/fs/bcachefs/util.c +++ b/fs/bcachefs/util.c @@ -447,9 +447,9 @@ void __bch2_time_stats_update(struct bch2_time_stats *stats, u64 start, u64 end) { unsigned long flags; - WARN_RATELIMIT(!stats->min_duration || !stats->min_freq, - "time_stats: min_duration = %llu, min_freq = %llu", - stats->min_duration, stats->min_freq); + WARN_ONCE(!stats->duration_stats_weighted.weight || + !stats->freq_stats_weighted.weight, + "uninitialized time_stats"); if (!stats->buffer) { spin_lock_irqsave(&stats->lock, flags);