Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs
[cascardo/linux.git] / net / llc / llc_conn.c
index 3b8cfbe..441bc18 100644 (file)
@@ -700,7 +700,7 @@ static struct sock *llc_create_incoming_sock(struct sock *sk,
                                             struct llc_addr *saddr,
                                             struct llc_addr *daddr)
 {
-       struct sock *newsk = llc_sk_alloc(sk->sk_family, GFP_ATOMIC,
+       struct sock *newsk = llc_sk_alloc(sk->sk_net, sk->sk_family, GFP_ATOMIC,
                                          sk->sk_prot);
        struct llc_sock *newllc, *llc = llc_sk(sk);
 
@@ -831,25 +831,21 @@ static void llc_sk_init(struct sock* sk)
        llc->inc_cntr = llc->dec_cntr = 2;
        llc->dec_step = llc->connect_step = 1;
 
-       init_timer(&llc->ack_timer.timer);
+       setup_timer(&llc->ack_timer.timer, llc_conn_ack_tmr_cb,
+                       (unsigned long)sk);
        llc->ack_timer.expire         = sysctl_llc2_ack_timeout;
-       llc->ack_timer.timer.data     = (unsigned long)sk;
-       llc->ack_timer.timer.function = llc_conn_ack_tmr_cb;
 
-       init_timer(&llc->pf_cycle_timer.timer);
+       setup_timer(&llc->pf_cycle_timer.timer, llc_conn_pf_cycle_tmr_cb,
+                       (unsigned long)sk);
        llc->pf_cycle_timer.expire         = sysctl_llc2_p_timeout;
-       llc->pf_cycle_timer.timer.data     = (unsigned long)sk;
-       llc->pf_cycle_timer.timer.function = llc_conn_pf_cycle_tmr_cb;
 
-       init_timer(&llc->rej_sent_timer.timer);
+       setup_timer(&llc->rej_sent_timer.timer, llc_conn_rej_tmr_cb,
+                       (unsigned long)sk);
        llc->rej_sent_timer.expire         = sysctl_llc2_rej_timeout;
-       llc->rej_sent_timer.timer.data     = (unsigned long)sk;
-       llc->rej_sent_timer.timer.function = llc_conn_rej_tmr_cb;
 
-       init_timer(&llc->busy_state_timer.timer);
+       setup_timer(&llc->busy_state_timer.timer, llc_conn_busy_tmr_cb,
+                       (unsigned long)sk);
        llc->busy_state_timer.expire         = sysctl_llc2_busy_timeout;
-       llc->busy_state_timer.timer.data     = (unsigned long)sk;
-       llc->busy_state_timer.timer.function = llc_conn_busy_tmr_cb;
 
        llc->n2 = 2;   /* max retransmit */
        llc->k  = 2;   /* tx win size, will adjust dynam */
@@ -867,9 +863,9 @@ static void llc_sk_init(struct sock* sk)
  *     Allocates a LLC sock and initializes it. Returns the new LLC sock
  *     or %NULL if there's no memory available for one
  */
-struct sock *llc_sk_alloc(int family, gfp_t priority, struct proto *prot)
+struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot)
 {
-       struct sock *sk = sk_alloc(family, priority, prot, 1);
+       struct sock *sk = sk_alloc(net, family, priority, prot);
 
        if (!sk)
                goto out;