Commit 4328fea7 authored by Karim Eshapa's avatar Karim Eshapa Committed by Steve French

fs: cifs: transport: Use time_after for time comparison

Use time_after kernel macro for time comparison
that has safety check.
Signed-off-by: default avatarKarim Eshapa <karim.eshapa@gmail.com>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
parent cd123007
...@@ -94,7 +94,7 @@ DeleteMidQEntry(struct mid_q_entry *midEntry) ...@@ -94,7 +94,7 @@ DeleteMidQEntry(struct mid_q_entry *midEntry)
now = jiffies; now = jiffies;
/* commands taking longer than one second are indications that /* commands taking longer than one second are indications that
something is wrong, unless it is quite a slow link or server */ 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)) { if ((cifsFYI & CIFS_TIMER) && (midEntry->command != command)) {
pr_debug(" CIFS slow rsp: cmd %d mid %llu", pr_debug(" CIFS slow rsp: cmd %d mid %llu",
midEntry->command, midEntry->mid); midEntry->command, midEntry->mid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment