From 7a83aa4e7b26ba61b9dc98d5c0bf725f4df0043f Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 23 Apr 2012 11:35:31 -0400 Subject: target: remove the task_size field in struct se_task Now that we don't split commands the size field in the task is always equivalent to the one in the CDB, even in cases where we have two tasks due to a BIDI transfer. Just refer the the size in the command instead of duplicating it in the task. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_rd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/target/target_core_rd.c') diff --git a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c index 0bec5729d073..c6ce46891be9 100644 --- a/drivers/target/target_core_rd.c +++ b/drivers/target/target_core_rd.c @@ -307,7 +307,7 @@ static int rd_do_task(struct se_task *task) se_dev->se_sub_dev->se_dev_attrib.block_size; rd_offset = do_div(tmp, PAGE_SIZE); rd_page = tmp; - rd_size = task->task_size; + rd_size = task->task_se_cmd->data_length; table = rd_get_sg_table(dev, rd_page); if (!table) -- cgit v1.2.1