From fa3c482bb3dc1f4ff80b2b461f1229c8746f64c1 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 27 Sep 2018 13:47:43 +0000 Subject: [PATCH] scst: Build fix for kernel versions <= v4.8 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7485 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 996c6219d..c92d4a26a 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -15707,7 +15707,7 @@ static void __scst_update_latency_stats(struct scst_cmd *cmd, int64_t deltac; #endif - if (stat && stat->last_update) { + if (stat && ktime_to_ns(stat->last_update) != 0) { delta = ktime_to_ns(ktime_sub(now, stat->last_update)); if (delta < 0 || delta > NSEC_PER_SEC) { printk_once(KERN_INFO "%d: ignoring large time delta %lld\n",