Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358896
b: refs/heads/master
c: 8f67835
h: refs/heads/master
v: v3
  • Loading branch information
Martin Svec authored and Nicholas Bellinger committed Feb 13, 2013
1 parent 9ccb004 commit b3c3888
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: d09816ae8fc05322b4e37a589537b4ecdca28a0d
refs/heads/master: 8f67835f1e389978bb0809d5e528961986aa2a69
6 changes: 4 additions & 2 deletions trunk/drivers/target/target_core_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,12 @@ static void rd_free_device(struct se_device *dev)

static struct rd_dev_sg_table *rd_get_sg_table(struct rd_dev *rd_dev, u32 page)
{
u32 i;
struct rd_dev_sg_table *sg_table;
u32 i, sg_per_table = (RD_MAX_ALLOCATION_SIZE /
sizeof(struct scatterlist));

for (i = 0; i < rd_dev->sg_table_count; i++) {
i = page / sg_per_table;
if (i < rd_dev->sg_table_count) {
sg_table = &rd_dev->sg_table_array[i];
if ((sg_table->page_start_offset <= page) &&
(sg_table->page_end_offset >= page))
Expand Down

0 comments on commit b3c3888

Please sign in to comment.