summaryrefslogtreecommitdiff
path: root/drivers/target/iscsi/iscsi_target_util.c
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2012-04-04 02:51:29 +0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-04-15 04:40:39 +0400
commitbfb79eac2026b411df9e253a9c350039b4b04bb7 (patch)
tree84b492b7d4c06c1083007b05fbcdae1bbb1f551f /drivers/target/iscsi/iscsi_target_util.c
parent11e319ed95dc0e8f0fa4cad88b33152e9203b262 (diff)
downloadlinux-bfb79eac2026b411df9e253a9c350039b4b04bb7.tar.xz
target/iscsi: Go back to core allocating data buffer for cmd
We originally changed iscsi to allocate its own buffers just as an intermediate step to clean up some core buffer allocation mechanisms. Now we can put it back. Also had to change allocate_iovecs to use data_length instead of t_data_nents because iovecs are now allocated before the data buffer, thus t_data_nents is not yet initialized. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_util.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_util.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c
index 9cd9f30c0237..b42cdeb153df 100644
--- a/drivers/target/iscsi/iscsi_target_util.c
+++ b/drivers/target/iscsi/iscsi_target_util.c
@@ -645,7 +645,6 @@ void iscsit_free_queue_reqs_for_conn(struct iscsi_conn *conn)
void iscsit_release_cmd(struct iscsi_cmd *cmd)
{
struct iscsi_conn *conn = cmd->conn;
- int i;
iscsit_free_r2ts_from_list(cmd);
iscsit_free_all_datain_reqs(cmd);
@@ -656,11 +655,6 @@ void iscsit_release_cmd(struct iscsi_cmd *cmd)
kfree(cmd->tmr_req);
kfree(cmd->iov_data);
- for (i = 0; i < cmd->t_mem_sg_nents; i++)
- __free_page(sg_page(&cmd->t_mem_sg[i]));
-
- kfree(cmd->t_mem_sg);
-
if (conn) {
iscsit_remove_cmd_from_immediate_queue(cmd, conn);
iscsit_remove_cmd_from_response_queue(cmd, conn);