summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorKarim Eshapa <karim.eshapa@gmail.com>2017-05-12 01:53:38 +0200
committerSteve French <smfrench@gmail.com>2017-05-12 19:56:44 -0500
commit4328fea77ca30ef6af938ae3f263a3d055a9c0e6 (patch)
tree24d961c5a7deddedaa6de5ffc4c524c71de1491b /fs/cifs
parentcd1230070ae1c12fd34cf6a557bfa81bf9311009 (diff)
downloadlinux-4328fea77ca30ef6af938ae3f263a3d055a9c0e6.tar.bz2
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 <karim.eshapa@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index de589d0d3739..47a125ece11e 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);