]> git.baikalelectronics.ru Git - kernel.git/commitdiff
bfq: Use 'ttime' local variable
authorJan Kara <jack@suse.cz>
Fri, 5 Jun 2020 14:16:17 +0000 (16:16 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 27 Jan 2021 16:15:38 +0000 (09:15 -0700)
Use local variable 'ttime' instead of dereferencing bfqq.

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c

index 4157cfe99ae23ff49ff51c523e2bfcb65949605d..a0471ff97120b25d27516b75e8dfea1bc06be61c 100644 (file)
@@ -5282,7 +5282,7 @@ static void bfq_update_io_thinktime(struct bfq_data *bfqd,
 
        elapsed = min_t(u64, elapsed, 2ULL * bfqd->bfq_slice_idle);
 
-       ttime->ttime_samples = (7*bfqq->ttime.ttime_samples + 256) / 8;
+       ttime->ttime_samples = (7*ttime->ttime_samples + 256) / 8;
        ttime->ttime_total = div_u64(7*ttime->ttime_total + 256*elapsed,  8);
        ttime->ttime_mean = div64_ul(ttime->ttime_total + 128,
                                     ttime->ttime_samples);