diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2018-01-17 03:14:05 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-01-18 22:49:23 +0300 |
commit | 795bc112cd5a40e7612313f54ee527198b1e734f (patch) | |
tree | c9372a14509097df92f1956b775a43865a92793c /drivers/infiniband/ulp/srpt/ib_srpt.h | |
parent | 48900a28348f5fac37bd2afd9ef6810442353196 (diff) | |
download | linux-795bc112cd5a40e7612313f54ee527198b1e734f.tar.xz |
IB/srpt: Make it safe to use RCU for srpt_device.rch_list
The next patch will iterate over rch_list from a context from which
it is not allowed to block. Hence make rch_list RCU-safe.
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/srpt/ib_srpt.h')
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.h b/drivers/infiniband/ulp/srpt/ib_srpt.h index 11ce8c94a051..0ab59c60f2ef 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.h +++ b/drivers/infiniband/ulp/srpt/ib_srpt.h @@ -244,6 +244,7 @@ enum rdma_ch_state { * @qp: IB queue pair used for communicating over this channel. * @cq: IB completion queue for this channel. * @zw_cqe: Zero-length write CQE. + * @rcu: RCU head. * @kref: kref for this channel. * @rq_size: IB receive queue size. * @max_rsp_size: Maximum size of an RSP response message in bytes. @@ -276,6 +277,7 @@ struct srpt_rdma_ch { struct ib_qp *qp; struct ib_cq *cq; struct ib_cqe zw_cqe; + struct rcu_head rcu; struct kref kref; int rq_size; u32 max_rsp_size; |