Skip to content

Commit

Permalink
mptcp: remove unneeded check on first subflow
Browse files Browse the repository at this point in the history
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.

Reviewed-by: Mat Martineau <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
  • Loading branch information
Paolo Abeni authored and jenkins-tessares committed Mar 26, 2021
1 parent c159ac9 commit a88e64e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/mptcp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,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
Expand Down

0 comments on commit a88e64e

Please sign in to comment.