fs: cifs: transport: Use time_after for time comparison
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- fs/cifs/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/transport.c +1 -1
@@ -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);
Signature · 1 line
2.7.4
Steve French
Appliedmerged into cifs-2.6.git for-next
Quoted 28 lines · Karim Eshapa
Use
time_afterkernel macro for time comparison
that has safety check.Signed-off-by Karim Eshapa <[email protected]>--- fs/cifs/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/cifs/transport.c +1
-2@@ -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); --2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Thanks, Steve