fixup! RDMA/counter: Combine allocation and bind logic
PATCH 1/1 fixup! RDMA/counter: Combine allocation and bind logic
From: Leon Romanovsky <[email protected]>
Jason, please squash this fixup to kbuild report I got tonight, Thanks.
--------
Failure in __rdma_counter_bind_qp() will cause
to mutex_unlock(&port_counter->lock); call again.
Signed-off-by Leon Romanovsky <[email protected]>
--- drivers/infiniband/core/counters.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/infiniband/core/counters.c +4 -2
@@ -124,14 +124,17 @@ static struct rdma_counter *alloc_and_bind(struct ib_device *dev, u8 port,case RDMA_COUNTER_MODE_MANUAL : ret =__counter_set_mode (&port_counter->mode,RDMA_COUNTER_MODE_MANUAL ,0 ); -if (ret) +if (ret) { +mutex_unlock (&port_counter->lock); goto err_mode; + }break ;case RDMA_COUNTER_MODE_AUTO :auto_mode_init_counter (counter, qp, port_counter->mode.mask);break ;default : ret = -EOPNOTSUPP ; +mutex_unlock (&port_counter->lock); goto err_mode; }
@@ -151,7 +154,6 @@ static struct rdma_counter *alloc_and_bind(struct ib_device *dev, u8 port,return counter; err_mode: -mutex_unlock (&port_counter->lock);kfree (counter->stats); err_stats:rdma_restrack_put (&counter->res);
--
2.28.0
Jason Gunthorpe
maintainerQuoted 4 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Jason, please squash this fixup to kbuild report I got tonight, Thanks.
Quoted 8 lines
--------
Failure in__rdma_counter_bind_qp()will cause
tomutex_unlock(&port_counter->lock); call again.Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/core/counters.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Ok, done
Thanks,
Jason