Ensure that we do initialise the fields xps_nactive, xps_queuelen and xps_net.
Unified · Split
| @@ -103,7 +103,9 @@ struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt, · 102 unmodified lines | |||
| 103 | if (xps != NULL) { | 103 | if (xps != NULL) { |
| 104 | spin_lock_init(&xps->xps_lock); | 104 | spin_lock_init(&xps->xps_lock); |
| 105 | kref_init(&xps->xps_kref); | 105 | kref_init(&xps->xps_kref); |
| 106 | xps->xps_nxprts = 0; | 106 | xps->xps_nxprts = xps->xps_nactive = 0; |
| 107 | atomic_long_set(&xps->xps_queuelen, 0); | ||
| 108 | xps->xps_net = NULL; | ||
| 107 | INIT_LIST_HEAD(&xps->xps_xprt_list); | 109 | INIT_LIST_HEAD(&xps->xps_xprt_list); |
| 108 | xps->xps_iter_ops = &rpc_xprt_iter_singular; | 110 | xps->xps_iter_ops = &rpc_xprt_iter_singular; |
| 109 | xprt_switch_add_xprt_locked(xps, xprt); | 111 | xprt_switch_add_xprt_locked(xps, xprt); |