Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=154adbc8469ff21fbf5c958446ee92dbaab01be1
Commit:     154adbc8469ff21fbf5c958446ee92dbaab01be1
Parent:     8fd1d178a3f177777707ee782f12d93e9a7eb5e5
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 1 00:38:43 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Nov 1 00:38:43 2007 -0700

    [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: Pavel Emelyanov <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/sock.c |   23 +++++++++--------------
 1 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index 4f4708a..6046fc6 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to