History

SUNRPC: Fix initialisation of struct rpc_xprt_switch

Ensure that we do initialise the fields xps_nactive, xps_queuelen and xps_net.

Trond Myklebust committed 7 years ago

Commit 9f98eff1 parent 163f8821 file · +3 −1Browse files

Unified · Split

net/sunrpc/xprtmultipath.c+3−1
@@ -103,7 +103,9 @@ struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt, · 102 unmodified lines
103103 if (xps != NULL) {
104104 spin_lock_init(&xps->xps_lock);
105105 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;
107109 INIT_LIST_HEAD(&xps->xps_xprt_list);
108110 xps->xps_iter_ops = &rpc_xprt_iter_singular;
109111 xprt_switch_add_xprt_locked(xps, xprt);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t