summaryrefslogtreecommitdiffstats
path: root/block/blk-stat.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:25:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:25:19 +0000
commit68b7faa497774b94377d3a8215d917bd006eae0b (patch)
treebab1434b47a284ca2893dcc0b908d1b95d982e7c /block/blk-stat.c
parentAdding upstream version 6.1.85. (diff)
downloadlinux-68b7faa497774b94377d3a8215d917bd006eae0b.tar.xz
linux-68b7faa497774b94377d3a8215d917bd006eae0b.zip
Adding upstream version 6.1.90.upstream/6.1.90upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'block/blk-stat.c')
-rw-r--r--block/blk-stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-stat.c b/block/blk-stat.c
index da9407b7d..41be89eca 100644
--- a/block/blk-stat.c
+++ b/block/blk-stat.c
@@ -28,7 +28,7 @@ void blk_rq_stat_init(struct blk_rq_stat *stat)
/* src is a per-cpu stat, mean isn't initialized */
void blk_rq_stat_sum(struct blk_rq_stat *dst, struct blk_rq_stat *src)
{
- if (!src->nr_samples)
+ if (dst->nr_samples + src->nr_samples <= dst->nr_samples)
return;
dst->min = min(dst->min, src->min);