tcp: constify tcp_create_openreq_child() socket argument
authorEric Dumazet <edumazet@google.com>
Tue, 29 Sep 2015 14:42:47 +0000 (07:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Sep 2015 23:53:09 +0000 (16:53 -0700)
This method does not touch the listener socket.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp_minisocks.c

index 1fe0bd458cb4b6865cee8f435dba749ed7a7da8e..85995c1291d022a59318857d09605ac2d1277f11 100644 (file)
@@ -450,7 +450,7 @@ void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb);
 void tcp_v4_mtu_reduced(struct sock *sk);
 void tcp_req_err(struct sock *sk, u32 seq);
 int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb);
-struct sock *tcp_create_openreq_child(struct sock *sk,
+struct sock *tcp_create_openreq_child(const struct sock *sk,
                                      struct request_sock *req,
                                      struct sk_buff *skb);
 void tcp_ca_openreq_child(struct sock *sk, const struct dst_entry *dst);
index 139668cc23473c425a88454d9f95efced0ec6529..897e34273ba36f53bd4a281a3901c27c68e25396 100644 (file)
@@ -441,7 +441,9 @@ EXPORT_SYMBOL_GPL(tcp_ca_openreq_child);
  * Actually, we could lots of memory writes here. tp of listening
  * socket contains all necessary default parameters.
  */
-struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req, struct sk_buff *skb)
+struct sock *tcp_create_openreq_child(const struct sock *sk,
+                                     struct request_sock *req,
+                                     struct sk_buff *skb)
 {
        struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC);