mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
mptcp: use mptcp_check_fallback helper
Use __mptcp_check_fallback() helper defined in net/mptcp/protocol.h, instead of open-coding it in both __mptcp_do_fallback() and mptcp_diag_fill_info(). Reviewed-by: Matthieu Baerts <matttbe@kernel.org> Signed-off-by: Geliang Tang <geliang.tang@suse.com> Signed-off-by: Mat Martineau <martineau@kernel.org> Link: https://lore.kernel.org/r/20231025-send-net-next-20231025-v1-5-db8f25f798eb@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
74cbb0c65b
commit
83d580ddbe
@ -1065,7 +1065,7 @@ static inline bool mptcp_check_fallback(const struct sock *sk)
|
||||
|
||||
static inline void __mptcp_do_fallback(struct mptcp_sock *msk)
|
||||
{
|
||||
if (test_bit(MPTCP_FALLBACK_DONE, &msk->flags)) {
|
||||
if (__mptcp_check_fallback(msk)) {
|
||||
pr_debug("TCP fallback already done (msk=%p)", msk);
|
||||
return;
|
||||
}
|
||||
|
@ -916,7 +916,7 @@ void mptcp_diag_fill_info(struct mptcp_sock *msk, struct mptcp_info *info)
|
||||
mptcp_pm_get_local_addr_max(msk);
|
||||
}
|
||||
|
||||
if (test_bit(MPTCP_FALLBACK_DONE, &msk->flags))
|
||||
if (__mptcp_check_fallback(msk))
|
||||
flags |= MPTCP_INFO_FLAG_FALLBACK;
|
||||
if (READ_ONCE(msk->can_ack))
|
||||
flags |= MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED;
|
||||
|
Loading…
Reference in New Issue
Block a user