diff options
author | Karim Eshapa <karim.eshapa@gmail.com> | 2017-05-12 01:53:38 +0200 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2017-05-12 19:56:44 -0500 |
commit | 4328fea77ca30ef6af938ae3f263a3d055a9c0e6 (patch) | |
tree | 24d961c5a7deddedaa6de5ffc4c524c71de1491b /fs/cifs | |
parent | cd1230070ae1c12fd34cf6a557bfa81bf9311009 (diff) | |
download | linux-4328fea77ca30ef6af938ae3f263a3d055a9c0e6.tar.gz linux-4328fea77ca30ef6af938ae3f263a3d055a9c0e6.tar.bz2 linux-4328fea77ca30ef6af938ae3f263a3d055a9c0e6.zip |
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.c | 2 |
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); |