Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b73585f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Revert "tcp: factor out __tcp_close() helper"



This reverts commit e6280603.  It is
part of a series that breaks the kernel abi for Android.  For this
kernel tree, we do not care so much about KASAN, so it's not a big issue
to revert.  If it is needed in the future, it can be brought back in an
abi-safe way.

Bug: 161946584
Change-Id: If4e4f69a51b196c752fcaa21bf7d27c971248e08
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent a11da66d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -389,7 +389,6 @@ void tcp_update_metrics(struct sock *sk);
void tcp_init_metrics(struct sock *sk);
void tcp_metrics_init(void);
bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst);
void __tcp_close(struct sock *sk, long timeout);
void tcp_close(struct sock *sk, long timeout);
void tcp_init_sock(struct sock *sk);
void tcp_init_transfer(struct sock *sk, int bpf_op);
+2 −7
Original line number Diff line number Diff line
@@ -2338,12 +2338,13 @@ bool tcp_check_oom(struct sock *sk, int shift)
	return too_many_orphans || out_of_socket_memory;
}

void __tcp_close(struct sock *sk, long timeout)
void tcp_close(struct sock *sk, long timeout)
{
	struct sk_buff *skb;
	int data_was_unread = 0;
	int state;

	lock_sock(sk);
	sk->sk_shutdown = SHUTDOWN_MASK;

	if (sk->sk_state == TCP_LISTEN) {
@@ -2504,12 +2505,6 @@ void __tcp_close(struct sock *sk, long timeout)
out:
	bh_unlock_sock(sk);
	local_bh_enable();
}

void tcp_close(struct sock *sk, long timeout)
{
	lock_sock(sk);
	__tcp_close(sk, timeout);
	release_sock(sk);
	sock_put(sk);
}