Merge tag 'erofs-for-6.6-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / include / net / tcp.h
index 91688d0..7b1a720 100644 (file)
@@ -348,12 +348,14 @@ ssize_t tcp_splice_read(struct socket *sk, loff_t *ppos,
 struct sk_buff *tcp_stream_alloc_skb(struct sock *sk, gfp_t gfp,
                                     bool force_schedule);
 
-static inline void tcp_dec_quickack_mode(struct sock *sk,
-                                        const unsigned int pkts)
+static inline void tcp_dec_quickack_mode(struct sock *sk)
 {
        struct inet_connection_sock *icsk = inet_csk(sk);
 
        if (icsk->icsk_ack.quick) {
+               /* How many ACKs S/ACKing new data have we sent? */
+               const unsigned int pkts = inet_csk_ack_scheduled(sk) ? 1 : 0;
+
                if (pkts >= icsk->icsk_ack.quick) {
                        icsk->icsk_ack.quick = 0;
                        /* Leaving quickack mode we deflate ATO. */