diff options
| author | Karim Eshapa <karim.eshapa@gmail.com> | 2017-05-11 19:53:38 -0400 |
|---|---|---|
| committer | Steve French <smfrench@gmail.com> | 2017-05-12 20:56:44 -0400 |
| commit | 4328fea77ca30ef6af938ae3f263a3d055a9c0e6 (patch) | |
| tree | 24d961c5a7deddedaa6de5ffc4c524c71de1491b | |
| parent | cd1230070ae1c12fd34cf6a557bfa81bf9311009 (diff) | |
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>
| -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) | |||
| 94 | now = jiffies; | 94 | now = jiffies; |
| 95 | /* commands taking longer than one second are indications that | 95 | /* commands taking longer than one second are indications that |
| 96 | something is wrong, unless it is quite a slow link or server */ | 96 | something is wrong, unless it is quite a slow link or server */ |
| 97 | if ((now - midEntry->when_alloc) > HZ) { | 97 | if (time_after(now, midEntry->when_alloc + HZ)) { |
| 98 | if ((cifsFYI & CIFS_TIMER) && (midEntry->command != command)) { | 98 | if ((cifsFYI & CIFS_TIMER) && (midEntry->command != command)) { |
| 99 | pr_debug(" CIFS slow rsp: cmd %d mid %llu", | 99 | pr_debug(" CIFS slow rsp: cmd %d mid %llu", |
| 100 | midEntry->command, midEntry->mid); | 100 | midEntry->command, midEntry->mid); |
