mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
IB/{rdmavt, qib, hfi1}: Use new routine to release reference counts
The reference count adjustments on reference count completion are open coded throughout. Add a routine to do all reference count adjustments and use. Reviewed-by: Michael J. Ruhl <[email protected]> Signed-off-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
This commit is contained in:
parent
52cdbcc2b1
commit
d40f69c9b9
4 changed files with 20 additions and 11 deletions
|
|
@ -723,6 +723,20 @@ static inline void rvt_mod_retry_timer(struct rvt_qp *qp)
|
|||
return rvt_mod_retry_timer_ext(qp, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* rvt_put_qp_swqe - drop refs held by swqe
|
||||
* @qp: the send qp
|
||||
* @wqe: the send wqe
|
||||
*
|
||||
* This drops any references held by the swqe
|
||||
*/
|
||||
static inline void rvt_put_qp_swqe(struct rvt_qp *qp, struct rvt_swqe *wqe)
|
||||
{
|
||||
rvt_put_swqe(wqe);
|
||||
if (qp->allowed_ops == IB_OPCODE_UD)
|
||||
atomic_dec(&ibah_to_rvtah(wqe->ud_wr.ah)->refcount);
|
||||
}
|
||||
|
||||
extern const int ib_rvt_state_ops[];
|
||||
|
||||
struct rvt_dev_info;
|
||||
|
|
|
|||
Loading…
Reference in a new issue