IB/mad: Change atomics to refcount API
authorShay Drory <shayd@mellanox.com>
Sun, 21 Jun 2020 10:47:37 +0000 (13:47 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 24 Jun 2020 19:43:45 +0000 (16:43 -0300)
commite41c425349bc9fa5399717c21f77bb7cd911084f
tree3f932a59b600635a550705974c72b056edc187a4
parentb9af0e2d5aeab77bef33bd3df073c3c96b69ec79
IB/mad: Change atomics to refcount API

The refcount API provides better safety than atomics API.  Therefore,
change atomic functions to refcount functions.

Link: https://lore.kernel.org/r/20200621104738.54850-4-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
drivers/infiniband/core/mad_priv.h
drivers/infiniband/core/mad_rmpp.c