summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/mad_priv.h
diff options
context:
space:
mode:
authorShay Drory <shayd@mellanox.com>2020-06-21 13:47:37 +0300
committerJason Gunthorpe <jgg@nvidia.com>2020-06-24 16:43:45 -0300
commite41c425349bc9fa5399717c21f77bb7cd911084f (patch)
tree3f932a59b600635a550705974c72b056edc187a4 /drivers/infiniband/core/mad_priv.h
parentb9af0e2d5aeab77bef33bd3df073c3c96b69ec79 (diff)
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>
Diffstat (limited to 'drivers/infiniband/core/mad_priv.h')
-rw-r--r--drivers/infiniband/core/mad_priv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/mad_priv.h b/drivers/infiniband/core/mad_priv.h
index 403d8673a2f9..4aa16b35dad0 100644
--- a/drivers/infiniband/core/mad_priv.h
+++ b/drivers/infiniband/core/mad_priv.h
@@ -103,7 +103,7 @@ struct ib_mad_agent_private {
struct work_struct local_work;
struct list_head rmpp_list;
- atomic_t refcount;
+ refcount_t refcount;
union {
struct completion comp;
struct rcu_head rcu;