From: Joe Thornber Date: Thu, 11 May 2017 10:14:16 +0000 (-0400) Subject: dm cache: fix incorrect 'idle_time' reset in IO tracker X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=072792dcdfc8d5f91a26050e5665285f50afebf5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git dm cache: fix incorrect 'idle_time' reset in IO tracker Some bios have no payload (eg, a FLUSH), don't reset the idle_time when these come in. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c index 1db375f50a13..0760ba409c21 100644 --- a/drivers/md/dm-cache-target.c +++ b/drivers/md/dm-cache-target.c @@ -94,6 +94,9 @@ static void iot_io_begin(struct io_tracker *iot, sector_t len) static void __iot_io_end(struct io_tracker *iot, sector_t len) { + if (!len) + return; + iot->in_flight -= len; if (!iot->in_flight) iot->idle_time = jiffies;