提交 4328fea7 编写于 作者: K Karim Eshapa 提交者: 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: NKarim Eshapa <karim.eshapa@gmail.com>
Signed-off-by: NSteve French <smfrench@gmail.com>
上级 cd123007
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册