Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287350
b: refs/heads/master
c: 9db9da3
h: refs/heads/master
v: v3
  • Loading branch information
roland@purestorage.com authored and Nicholas Bellinger committed Jan 18, 2012
1 parent 554bc60 commit 2ffb46d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: 6816966a8418b980481b4dced7eddd1796b145e8
refs/heads/master: 9db9da332250dbe662995703a4dcdd692112f0c3
5 changes: 4 additions & 1 deletion trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -3516,6 +3516,7 @@ transport_generic_get_mem(struct se_cmd *cmd)
u32 length = cmd->data_length;
unsigned int nents;
struct page *page;
gfp_t zero_flag;
int i = 0;

nents = DIV_ROUND_UP(length, PAGE_SIZE);
Expand All @@ -3526,9 +3527,11 @@ transport_generic_get_mem(struct se_cmd *cmd)
cmd->t_data_nents = nents;
sg_init_table(cmd->t_data_sg, nents);

zero_flag = cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB ? 0 : __GFP_ZERO;

while (length) {
u32 page_len = min_t(u32, length, PAGE_SIZE);
page = alloc_page(GFP_KERNEL | __GFP_ZERO);
page = alloc_page(GFP_KERNEL | zero_flag);
if (!page)
goto out;

Expand Down

0 comments on commit 2ffb46d

Please sign in to comment.