On Thu, Aug 05, 2021 at 06:13:32PM +0530, Dakshaja Uppalapati wrote: > Previous atomic increment decrement logic expects the atomic count > to be '0' after the final decrement. Replacing atomic count with > refcount does not allow that, as refcount_dec() considers count of 1 > as underflow. Therefore fix the current refcount logic by decrementing > the refcount and test if it is '0' on the final deref in > c4iw_destroy_cq(). Use wait_for_completion() instead of wait_event(). > > Fixes: 7183451f846d (RDMA/cxgb4: Use refcount_t instead of atomic_t for reference counting") > Signed-off-by: Dakshaja Uppalapati <dakshaja@xxxxxxxxxxx> > Reviewed-by: Potnuri Bharat Teja <bharat@xxxxxxxxxxx> > --- > changelog: > v0->v1: used wait for completion instead of wait_event. > --- > drivers/infiniband/hw/cxgb4/cq.c | 12 +++++++++--- > drivers/infiniband/hw/cxgb4/ev.c | 6 ++---- > drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 3 ++- > 3 files changed, 13 insertions(+), 8 deletions(-) There were several errors in the patch, damaged white space, bad fixes line. Please be more careful in future. I corrected them and applied to for-rc, thanks Jason