Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87165
b: refs/heads/master
c: d33ed42
h: refs/heads/master
i:
  87163: be7ff96
v: v3
  • Loading branch information
Arne Redlich authored and Roland Dreier committed Mar 11, 2008
1 parent 46e162d commit 0bf481e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a378270c085080b2f38dee6308de4d8413b5141
refs/heads/master: d33ed425c6cc14370d8c418b504328d2c3db58b4
13 changes: 9 additions & 4 deletions trunk/drivers/infiniband/ulp/iser/iser_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ struct iser_device *iser_device_find_by_ib_device(struct rdma_cm_id *cma_id)
list_for_each_entry(device, &ig.device_list, ig_list)
/* find if there's a match using the node GUID */
if (device->ib_device->node_guid == cma_id->device->node_guid)
goto out;
goto inc_refcnt;

device = kzalloc(sizeof *device, GFP_KERNEL);
if (device == NULL)
Expand All @@ -260,9 +260,9 @@ struct iser_device *iser_device_find_by_ib_device(struct rdma_cm_id *cma_id)
}
list_add(&device->ig_list, &ig.device_list);

out:
BUG_ON(device == NULL);
inc_refcnt:
device->refcount++;
out:
mutex_unlock(&ig.device_list_mutex);
return device;
}
Expand Down Expand Up @@ -368,6 +368,12 @@ static void iser_addr_handler(struct rdma_cm_id *cma_id)
int ret;

device = iser_device_find_by_ib_device(cma_id);
if (!device) {
iser_err("device lookup/creation failed\n");
iser_connect_error(cma_id);
return;
}

ib_conn = (struct iser_conn *)cma_id->context;
ib_conn->device = device;

Expand All @@ -376,7 +382,6 @@ static void iser_addr_handler(struct rdma_cm_id *cma_id)
iser_err("resolve route failed: %d\n", ret);
iser_connect_error(cma_id);
}
return;
}

static void iser_route_handler(struct rdma_cm_id *cma_id)
Expand Down

0 comments on commit 0bf481e

Please sign in to comment.