Commit 154adbc8 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by David S. Miller

[NET]: Remove bogus zero_it argument from sk_alloc

At this point nobody calls the sk_alloc(() with zero_it == 0,
so remove unneeded checks from it.
Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8fd1d178
...@@ -931,12 +931,8 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority, ...@@ -931,12 +931,8 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
{ {
struct sock *sk; struct sock *sk;
if (zero_it) sk = sk_prot_alloc(prot, priority | __GFP_ZERO, family);
priority |= __GFP_ZERO;
sk = sk_prot_alloc(prot, priority, family);
if (sk) { if (sk) {
if (zero_it) {
sk->sk_family = family; sk->sk_family = family;
/* /*
* See comment in struct sock definition to understand * See comment in struct sock definition to understand
...@@ -946,7 +942,6 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority, ...@@ -946,7 +942,6 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
sock_lock_init(sk); sock_lock_init(sk);
sk->sk_net = get_net(net); sk->sk_net = get_net(net);
} }
}
return sk; return sk;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment