Commit 9f98effc authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Fix initialisation of struct rpc_xprt_switch

Ensure that we do initialise the fields xps_nactive, xps_queuelen
and xps_net.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 163f8821
...@@ -103,7 +103,9 @@ struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt, ...@@ -103,7 +103,9 @@ struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt,
if (xps != NULL) { if (xps != NULL) {
spin_lock_init(&xps->xps_lock); spin_lock_init(&xps->xps_lock);
kref_init(&xps->xps_kref); kref_init(&xps->xps_kref);
xps->xps_nxprts = 0; xps->xps_nxprts = xps->xps_nactive = 0;
atomic_long_set(&xps->xps_queuelen, 0);
xps->xps_net = NULL;
INIT_LIST_HEAD(&xps->xps_xprt_list); INIT_LIST_HEAD(&xps->xps_xprt_list);
xps->xps_iter_ops = &rpc_xprt_iter_singular; xps->xps_iter_ops = &rpc_xprt_iter_singular;
xprt_switch_add_xprt_locked(xps, xprt); xprt_switch_add_xprt_locked(xps, xprt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment