Merge branches 'intel_pstate', 'pm-cpufreq' and 'pm-cpufreq-sched'
[sfrench/cifs-2.6.git] / fs / cifs / transport.c
index 4d64b5b8fc9c6fae67f7f3e0ec74284548ff7c32..47a125ece11ea0d3e2daa0814c8cab28b4643bb1 100644 (file)
@@ -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);
@@ -613,9 +613,7 @@ cifs_sync_mid_result(struct mid_q_entry *mid, struct TCP_Server_Info *server)
        }
        spin_unlock(&GlobalMid_Lock);
 
-       mutex_lock(&server->srv_mutex);
        DeleteMidQEntry(mid);
-       mutex_unlock(&server->srv_mutex);
        return rc;
 }