projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd12300
)
fs: cifs: transport: Use time_after for time comparison
author
Karim Eshapa
<
[email protected]
>
Thu, 11 May 2017 23:53:38 +0000
(
01:53
+0200)
committer
Steve French
<
[email protected]
>
Sat, 13 May 2017 00:56:44 +0000
(19:56 -0500)
Use time_after kernel macro for time comparison
that has safety check.
Signed-off-by: Karim Eshapa <
[email protected]
>
Signed-off-by: Steve French <
[email protected]
>
fs/cifs/transport.c
patch
|
blob
|
history
diff --git
a/fs/cifs/transport.c
b/fs/cifs/transport.c
index de589d0d3739275c5aeac9b4a489055a4695203a..47a125ece11ea0d3e2daa0814c8cab28b4643bb1 100644
(file)
--- 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);