WorkStruct: make allyesconfig
[safe/jmp/linux-2.6] / net / dccp / minisocks.c
index 9e1de59..36db5be 100644 (file)
@@ -10,7 +10,6 @@
  *     2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/dccp.h>
 #include <linux/skbuff.h>
 #include <linux/timer.h>
@@ -32,8 +31,7 @@ struct inet_timewait_death_row dccp_death_row = {
        .tw_timer       = TIMER_INITIALIZER(inet_twdr_hangman, 0,
                                            (unsigned long)&dccp_death_row),
        .twkill_work    = __WORK_INITIALIZER(dccp_death_row.twkill_work,
-                                            inet_twdr_twkill_work,
-                                            &dccp_death_row),
+                                            inet_twdr_twkill_work),
 /* Short-time timewait calendar */
 
        .twcal_hand     = -1,
@@ -107,6 +105,7 @@ struct sock *dccp_create_openreq_child(struct sock *sk,
                const struct dccp_request_sock *dreq = dccp_rsk(req);
                struct inet_connection_sock *newicsk = inet_csk(sk);
                struct dccp_sock *newdp = dccp_sk(newsk);
+               struct dccp_minisock *newdmsk = dccp_msk(newsk);
 
                newdp->dccps_role          = DCCP_ROLE_SERVER;
                newdp->dccps_hc_rx_ackvec  = NULL;
@@ -118,26 +117,24 @@ struct sock *dccp_create_openreq_child(struct sock *sk,
                if (dccp_feat_clone(sk, newsk))
                        goto out_free;
 
-               if (newdp->dccps_options.dccpo_send_ack_vector) {
+               if (newdmsk->dccpms_send_ack_vector) {
                        newdp->dccps_hc_rx_ackvec =
                                                dccp_ackvec_alloc(GFP_ATOMIC);
-                       /*
-                        * XXX: We're using the same CCIDs set on the parent,
-                        * i.e. sk_clone copied the master sock and left the
-                        * CCID pointers for this child, that is why we do the
-                        * __ccid_get calls.
-                        */
                        if (unlikely(newdp->dccps_hc_rx_ackvec == NULL))
                                goto out_free;
                }
 
-               if (unlikely(ccid_hc_rx_init(newdp->dccps_hc_rx_ccid,
-                                            newsk) != 0 ||
-                            ccid_hc_tx_init(newdp->dccps_hc_tx_ccid,
-                                            newsk) != 0)) {
+               newdp->dccps_hc_rx_ccid =
+                           ccid_hc_rx_new(newdmsk->dccpms_rx_ccid,
+                                          newsk, GFP_ATOMIC);
+               newdp->dccps_hc_tx_ccid =
+                           ccid_hc_tx_new(newdmsk->dccpms_tx_ccid,
+                                          newsk, GFP_ATOMIC);
+               if (unlikely(newdp->dccps_hc_rx_ccid == NULL ||
+                            newdp->dccps_hc_tx_ccid == NULL)) {
                        dccp_ackvec_free(newdp->dccps_hc_rx_ackvec);
-                       ccid_hc_rx_exit(newdp->dccps_hc_rx_ccid, newsk);
-                       ccid_hc_tx_exit(newdp->dccps_hc_tx_ccid, newsk);
+                       ccid_hc_rx_delete(newdp->dccps_hc_rx_ccid, newsk);
+                       ccid_hc_tx_delete(newdp->dccps_hc_tx_ccid, newsk);
 out_free:
                        /* It is still raw copy of parent, so invalidate
                         * destructor and make plain sk_free() */
@@ -146,9 +143,6 @@ out_free:
                        return NULL;
                }
 
-               __ccid_get(newdp->dccps_hc_rx_ccid);
-               __ccid_get(newdp->dccps_hc_tx_ccid);
-
                /*
                 * Step 3: Process LISTEN state
                 *
@@ -158,7 +152,7 @@ out_free:
                 */
 
                /* See dccp_v4_conn_request */
-               newdp->dccps_options.dccpo_sequence_window = req->rcv_wnd;
+               newdmsk->dccpms_sequence_window = req->rcv_wnd;
 
                newdp->dccps_gar = newdp->dccps_isr = dreq->dreq_isr;
                dccp_update_gsr(newsk, dreq->dreq_isr);