Skip to content

Commit

Permalink
target: Don't allocate pages for NULLIO devices
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Andy Grover authored and Nicholas Bellinger committed Jun 14, 2013
1 parent db5d1c3 commit 670caa9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/target/target_core_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ static int rd_build_device_space(struct rd_dev *rd_dev)
rd_dev->rd_page_count);
return -EINVAL;
}

/* Don't need backing pages for NULLIO */
if (rd_dev->rd_flags & RDF_NULLIO)
return 0;

total_sg_needed = rd_dev->rd_page_count;

sg_tables = (total_sg_needed / max_sg_per_table) + 1;
Expand Down

0 comments on commit 670caa9

Please sign in to comment.