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>
This commit is contained in:

committed by
Nicholas Bellinger

parent
11e319ed95
commit
bfb79eac20
@@ -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);
|
||||
|
Reference in New Issue
Block a user