]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mad: Issue complete whenever decrements agent refcount
authorShay Drory <shayd@mellanox.com>
Sun, 21 Jun 2020 10:47:36 +0000 (13:47 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 24 Jun 2020 19:43:44 +0000 (16:43 -0300)
commit0fe2b23994572209f75ca1ad5e3d954f55671a51
treebcea9450fcd3a3b1e026a0fb3984a87ee27b441c
parent7d1f2c360e8eda0a50b048ba8a7384141ca2f30e
IB/mad: Issue complete whenever decrements agent refcount

Replace calls of atomic_dec() to mad_agent_priv->refcount with calls to
deref_mad_agent() in order to issue complete. Most likely the refcount is
> 1 at these points, but it is difficult to prove. Performance is not
important on these paths, so be obviously correct.

Link: https://lore.kernel.org/r/20200621104738.54850-3-leon@kernel.org
Signed-off-by: Shay Drory <shayd@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/mad.c