Message ID | 20200605141629.15347-2-jack@suse.cz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | bfq: Two fixes and a cleanup for sequential readers | expand |
> Il giorno 5 giu 2020, alle ore 16:16, Jan Kara <jack@suse.cz> ha scritto: > > Use local variable 'ttime' instead of dereferencing bfqq. > Acked-by: Paolo Valente <paolo.valente@linaro.org> Thanks! > Signed-off-by: Jan Kara <jack@suse.cz> > --- > block/bfq-iosched.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c > index 50017275915f..c66c3eaa9e26 100644 > --- a/block/bfq-iosched.c > +++ b/block/bfq-iosched.c > @@ -5196,7 +5196,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); > -- > 2.16.4 >
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 50017275915f..c66c3eaa9e26 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -5196,7 +5196,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);
Use local variable 'ttime' instead of dereferencing bfqq. Signed-off-by: Jan Kara <jack@suse.cz> --- block/bfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)