diff options
| author | Leon Romanovsky <leonro@mellanox.com> | 2018-10-02 04:48:02 -0400 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-10-05 18:07:39 -0400 |
| commit | 2165fc264079ecb7fbfa5e8b330a92eb3f0fcbe1 (patch) | |
| tree | 3363cce91e6438d83b44de997486e5ea6dda8a79 /drivers/infiniband/core/cma.c | |
| parent | 363ad35577de3a73cf97006ec5f00fccaee73172 (diff) | |
RDMA/restrack: Consolidate task name updates in one place
Unify task update and kernel name set in one place.
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Reviewed-by: Yossi Itigin <yosefe@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/cma.c')
| -rw-r--r-- | drivers/infiniband/core/cma.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 897aac68158b..f117b755c4c2 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
| @@ -875,10 +875,7 @@ struct rdma_cm_id *__rdma_create_id(struct net *net, | |||
| 875 | if (!id_priv) | 875 | if (!id_priv) |
| 876 | return ERR_PTR(-ENOMEM); | 876 | return ERR_PTR(-ENOMEM); |
| 877 | 877 | ||
| 878 | if (caller) | 878 | rdma_restrack_set_task(&id_priv->res, caller); |
| 879 | id_priv->res.kern_name = caller; | ||
| 880 | else | ||
| 881 | rdma_restrack_set_task(&id_priv->res, current); | ||
| 882 | id_priv->res.type = RDMA_RESTRACK_CM_ID; | 879 | id_priv->res.type = RDMA_RESTRACK_CM_ID; |
| 883 | id_priv->state = RDMA_CM_IDLE; | 880 | id_priv->state = RDMA_CM_IDLE; |
| 884 | id_priv->id.context = context; | 881 | id_priv->id.context = context; |
| @@ -3945,10 +3942,7 @@ int __rdma_accept(struct rdma_cm_id *id, struct rdma_conn_param *conn_param, | |||
| 3945 | 3942 | ||
| 3946 | id_priv = container_of(id, struct rdma_id_private, id); | 3943 | id_priv = container_of(id, struct rdma_id_private, id); |
| 3947 | 3944 | ||
| 3948 | if (caller) | 3945 | rdma_restrack_set_task(&id_priv->res, caller); |
| 3949 | id_priv->res.kern_name = caller; | ||
| 3950 | else | ||
| 3951 | rdma_restrack_set_task(&id_priv->res, current); | ||
| 3952 | 3946 | ||
| 3953 | if (!cma_comp(id_priv, RDMA_CM_CONNECT)) | 3947 | if (!cma_comp(id_priv, RDMA_CM_CONNECT)) |
| 3954 | return -EINVAL; | 3948 | return -EINVAL; |
