aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-06-17 22:41:38 -0700
committerDavid S. Miller <davem@davemloft.net>2008-06-17 22:41:38 -0700
commit972692e0db9b0a62329ca394062b58917ddbd03c (patch)
tree6060599150b57de1f94ed85f8078da098fb8eb6a /net/core
parent5bbc1722d52ad3df062d5742a7e958276e57ebd7 (diff)
downloadkernel_samsung_aries-972692e0db9b0a62329ca394062b58917ddbd03c.zip
kernel_samsung_aries-972692e0db9b0a62329ca394062b58917ddbd03c.tar.gz
kernel_samsung_aries-972692e0db9b0a62329ca394062b58917ddbd03c.tar.bz2
net: Add sk_set_socket() helper.
In order to more easily grep for all things that set sk->sk_socket, add sk_set_socket() helper inline function. Suggested (although only half-seriously) by Evgeniy Polyakov. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 3879bf6..2c0ba52 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1066,7 +1066,7 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority)
* to be taken into account in all callers. -acme
*/
sk_refcnt_debug_inc(newsk);
- newsk->sk_socket = NULL;
+ sk_set_socket(newsk, NULL);
newsk->sk_sleep = NULL;
if (newsk->sk_prot->sockets_allocated)
@@ -1702,7 +1702,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
sk->sk_rcvbuf = sysctl_rmem_default;
sk->sk_sndbuf = sysctl_wmem_default;
sk->sk_state = TCP_CLOSE;
- sk->sk_socket = sock;
+ sk_set_socket(sk, sock);
sock_set_flag(sk, SOCK_ZAPPED);