mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
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>
This commit is contained in:
parent
cd1230070a
commit
4328fea77c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user