Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260830
b: refs/heads/master
c: 277c5f2
h: refs/heads/master
v: v3
  • Loading branch information
Nicholas Bellinger committed Jul 26, 2011
1 parent d516268 commit 594f344
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 36a26c69b4c70396ef569c3452690fba0c1dec08
refs/heads/master: 277c5f27a2c86a9a733c0ec0f6a9b1032dfa3e15
7 changes: 3 additions & 4 deletions trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -4052,17 +4052,16 @@ static int transport_allocate_data_tasks(
struct se_task *task;
struct se_device *dev = cmd->se_dev;
unsigned long flags;
sector_t sectors;
int task_count, i, ret;
sector_t dev_max_sectors = dev->se_sub_dev->se_dev_attrib.max_sectors;
sector_t sectors, dev_max_sectors = dev->se_sub_dev->se_dev_attrib.max_sectors;
u32 sector_size = dev->se_sub_dev->se_dev_attrib.block_size;
struct scatterlist *sg;
struct scatterlist *cmd_sg;

WARN_ON(cmd->data_length % sector_size);
sectors = DIV_ROUND_UP(cmd->data_length, sector_size);
task_count = DIV_ROUND_UP(sectors, dev_max_sectors);

task_count = DIV_ROUND_UP_SECTOR_T(sectors, dev_max_sectors);
cmd_sg = sgl;
for (i = 0; i < task_count; i++) {
unsigned int task_size;
Expand Down

0 comments on commit 594f344

Please sign in to comment.