From: Karim Eshapa Date: Thu, 11 May 2017 23:53:38 +0000 (+0200) Subject: fs: cifs: transport: Use time_after for time comparison X-Git-Tag: v4.14-rc1~895^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4328fea77ca30ef6af938ae3f263a3d055a9c0e6;p=platform%2Fkernel%2Flinux-rpi3.git fs: cifs: transport: Use time_after for time comparison Use time_after kernel macro for time comparison that has safety check. Signed-off-by: Karim Eshapa Signed-off-by: Steve French --- diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index de589d0..47a125e 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -94,7 +94,7 @@ DeleteMidQEntry(struct mid_q_entry *midEntry) now = jiffies; /* commands taking longer than one second are indications that something is wrong, unless it is quite a slow link or server */ - if ((now - midEntry->when_alloc) > HZ) { + if (time_after(now, midEntry->when_alloc + HZ)) { if ((cifsFYI & CIFS_TIMER) && (midEntry->command != command)) { pr_debug(" CIFS slow rsp: cmd %d mid %llu", midEntry->command, midEntry->mid);