Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72977
b: refs/heads/master
c: 154adbc
h: refs/heads/master
i:
  72975: 8c58cdc
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Nov 1, 2007
1 parent de91015 commit 127bbf4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8fd1d178a3f177777707ee782f12d93e9a7eb5e5
refs/heads/master: 154adbc8469ff21fbf5c958446ee92dbaab01be1
23 changes: 9 additions & 14 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,21 +931,16 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
{
struct sock *sk;

if (zero_it)
priority |= __GFP_ZERO;

sk = sk_prot_alloc(prot, priority, family);
sk = sk_prot_alloc(prot, priority | __GFP_ZERO, family);
if (sk) {
if (zero_it) {
sk->sk_family = family;
/*
* See comment in struct sock definition to understand
* why we need sk_prot_creator -acme
*/
sk->sk_prot = sk->sk_prot_creator = prot;
sock_lock_init(sk);
sk->sk_net = get_net(net);
}
sk->sk_family = family;
/*
* See comment in struct sock definition to understand
* why we need sk_prot_creator -acme
*/
sk->sk_prot = sk->sk_prot_creator = prot;
sock_lock_init(sk);
sk->sk_net = get_net(net);
}

return sk;
Expand Down

0 comments on commit 127bbf4

Please sign in to comment.