diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-03-29 14:52:14 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-04-08 08:27:54 +0200 |
commit | cf8ae95823ae99186729834a630f24ff9e7b1501 (patch) | |
tree | b0c0ece37a1c96c4735d334328369bb35c57f418 /drivers/infiniband | |
parent | iser-target: Rename rend/recv completion routines (diff) | |
download | linux-cf8ae95823ae99186729834a630f24ff9e7b1501.tar.xz linux-cf8ae95823ae99186729834a630f24ff9e7b1501.zip |
iser-target: Rename device find/release routines
isert_device_find_by_ib_dev and isert_device_try_release
can have a better, more common name like isert_device_[get|put].
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index f01502353ae2..d19271bb8de1 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -410,7 +410,7 @@ isert_free_device_ib_res(struct isert_device *device) } static void -isert_device_try_release(struct isert_device *device) +isert_device_put(struct isert_device *device) { mutex_lock(&device_list_mutex); device->refcount--; @@ -424,7 +424,7 @@ isert_device_try_release(struct isert_device *device) } static struct isert_device * -isert_device_find_by_ib_dev(struct rdma_cm_id *cma_id) +isert_device_get(struct rdma_cm_id *cma_id) { struct isert_device *device; int ret; @@ -713,11 +713,12 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) goto out_req_dma_map; } - device = isert_device_find_by_ib_dev(cma_id); + device = isert_device_get(cma_id); if (IS_ERR(device)) { ret = PTR_ERR(device); goto out_rsp_dma_map; } + isert_conn->conn_device = device; /* Set max inflight RDMA READ requests */ isert_conn->initiator_depth = min_t(u8, @@ -725,8 +726,6 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) device->dev_attr.max_qp_init_rd_atom); isert_dbg("Using initiator_depth: %u\n", isert_conn->initiator_depth); - isert_conn->conn_device = device; - ret = isert_conn_setup_qp(isert_conn, cma_id); if (ret) goto out_conn_dev; @@ -748,7 +747,7 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) return 0; out_conn_dev: - isert_device_try_release(device); + isert_device_put(device); out_rsp_dma_map: ib_dma_unmap_single(ib_dev, isert_conn->login_rsp_dma, ISER_RX_LOGIN_SIZE, DMA_TO_DEVICE); @@ -796,7 +795,7 @@ isert_connect_release(struct isert_conn *isert_conn) kfree(isert_conn); if (device) - isert_device_try_release(device); + isert_device_put(device); } static void |