Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257838
b: refs/heads/master
c: 74dcd0e
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Jun 29, 2011
1 parent 478c297 commit d54380f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 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: 03adb5f91280b433c3685d0ee86b2e1424af3d88
refs/heads/master: 74dcd0ec735ba9c5bef254b2f6e53068cf3f9ff0
14 changes: 3 additions & 11 deletions trunk/drivers/scsi/libiscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,8 @@ iscsi_tcp_conn_setup(struct iscsi_cls_session *cls_session, int dd_data_size,
struct iscsi_cls_conn *cls_conn;
struct iscsi_tcp_conn *tcp_conn;

cls_conn = iscsi_conn_setup(cls_session, sizeof(*tcp_conn), conn_idx);
cls_conn = iscsi_conn_setup(cls_session,
sizeof(*tcp_conn) + dd_data_size, conn_idx);
if (!cls_conn)
return NULL;
conn = cls_conn->dd_data;
Expand All @@ -1096,22 +1097,13 @@ iscsi_tcp_conn_setup(struct iscsi_cls_session *cls_session, int dd_data_size,

tcp_conn = conn->dd_data;
tcp_conn->iscsi_conn = conn;

tcp_conn->dd_data = kzalloc(dd_data_size, GFP_KERNEL);
if (!tcp_conn->dd_data) {
iscsi_conn_teardown(cls_conn);
return NULL;
}
tcp_conn->dd_data = conn->dd_data + sizeof(*tcp_conn);
return cls_conn;
}
EXPORT_SYMBOL_GPL(iscsi_tcp_conn_setup);

void iscsi_tcp_conn_teardown(struct iscsi_cls_conn *cls_conn)
{
struct iscsi_conn *conn = cls_conn->dd_data;
struct iscsi_tcp_conn *tcp_conn = conn->dd_data;

kfree(tcp_conn->dd_data);
iscsi_conn_teardown(cls_conn);
}
EXPORT_SYMBOL_GPL(iscsi_tcp_conn_teardown);
Expand Down

0 comments on commit d54380f

Please sign in to comment.