]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/ipv4/tcp_output.c
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[linux.git] / net / ipv4 / tcp_output.c
index 4e985dea1dd24fdecfbf9b47d51cff698e97cd2f..2f1588bf73dad9b34aebee45ce738a7e9a4515ae 100644 (file)
@@ -2202,9 +2202,10 @@ static bool tcp_small_queue_check(struct sock *sk, const struct sk_buff *skb,
 static void tcp_chrono_set(struct tcp_sock *tp, const enum tcp_chrono new)
 {
        const u32 now = tcp_jiffies32;
+       enum tcp_chrono old = tp->chrono_type;
 
-       if (tp->chrono_type > TCP_CHRONO_UNSPEC)
-               tp->chrono_stat[tp->chrono_type - 1] += now - tp->chrono_start;
+       if (old > TCP_CHRONO_UNSPEC)
+               tp->chrono_stat[old - 1] += now - tp->chrono_start;
        tp->chrono_start = now;
        tp->chrono_type = new;
 }