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

    [NET]: Make the sk_clone() lighter
    
    The sk_prot_alloc() already performs all the stuff needed by the
    sk_clone(). Besides, the sk_prot_alloc() requires almost twice
    less arguments than the sk_alloc() does, so call the sk_prot_alloc()
    saving the stack a bit.
    
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/sock.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index 2b744c2..4f4708a 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -976,8 +976,9 @@ void sk_free(struct sock *sk)
 
 struct sock *sk_clone(const struct sock *sk, const gfp_t priority)
 {
-       struct sock *newsk = sk_alloc(sk->sk_net, sk->sk_family, priority, 
sk->sk_prot, 0);
+       struct sock *newsk;
 
+       newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
        if (newsk != NULL) {
                struct sk_filter *filter;
 
-
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