]> www.infradead.org Git - users/willy/linux.git/commitdiff
mptcp: remove unneeded check on first subflow
authorPaolo Abeni <pabeni@redhat.com>
Thu, 1 Apr 2021 23:19:43 +0000 (16:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Apr 2021 21:21:50 +0000 (14:21 -0700)
Currently we explicitly check for the first subflow being
NULL in a couple of places, even if we don't need any
special actions in such scenario.

Just drop the unneeded checks, to avoid confusion.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/options.c
net/mptcp/protocol.c

index 69cafaacc31bfc771f23d622f0436de50fec8c9d..68361d28dc676517cc45b8526cf36950f6bea07f 100644 (file)
@@ -952,7 +952,7 @@ bool mptcp_update_rcv_data_fin(struct mptcp_sock *msk, u64 data_fin_seq, bool us
         * should match. If they mismatch, the peer is misbehaving and
         * we will prefer the most recent information.
         */
-       if (READ_ONCE(msk->rcv_data_fin) || !READ_ONCE(msk->first))
+       if (READ_ONCE(msk->rcv_data_fin))
                return false;
 
        WRITE_ONCE(msk->rcv_data_fin_seq,
index 0c916d48cad8b5911a4d8088553cebc5092a5f76..531ee24aa8275f332eb0fb8377c2bde08b9fc0d9 100644 (file)
@@ -493,7 +493,7 @@ static bool mptcp_check_data_fin(struct sock *sk)
        u64 rcv_data_fin_seq;
        bool ret = false;
 
-       if (__mptcp_check_fallback(msk) || !msk->first)
+       if (__mptcp_check_fallback(msk))
                return ret;
 
        /* Need to ack a DATA_FIN received from a peer while this side