From: Eric Dumazet Date: Fri, 25 Sep 2015 14:39:24 +0000 (-0700) Subject: inet: constify inet_rtx_syn_ack() sock argument X-Git-Tag: v4.4-rc1~141^2~274^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b70e977cef6ce7e7411c9bbec21f9adc8e29097;p=platform%2Fkernel%2Flinux-exynos.git inet: constify inet_rtx_syn_ack() sock argument SYNACK packets are sent on behalf on unlocked listeners or fastopen sockets. Mark socket as const to catch future changes that might break the assumption. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/include/net/request_sock.h b/include/net/request_sock.h index ff7ce1e..181f97f 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h @@ -42,7 +42,7 @@ struct request_sock_ops { void (*syn_ack_timeout)(const struct request_sock *req); }; -int inet_rtx_syn_ack(struct sock *parent, struct request_sock *req); +int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req); /* struct request_sock - mini sock to represent a connection request */ diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index ad087c1..bac2051 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -563,7 +563,7 @@ static inline void syn_ack_recalc(struct request_sock *req, const int thresh, req->num_timeout >= rskq_defer_accept - 1; } -int inet_rtx_syn_ack(struct sock *parent, struct request_sock *req) +int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req) { int err = req->rsk_ops->rtx_syn_ack(parent, req);