target: Refactor transport_generic_get_mem to target_alloc_sgl
authorNicholas Bellinger <nab@daterainc.com>
Sun, 25 Aug 2013 22:44:03 +0000 (15:44 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 9 Sep 2013 21:29:30 +0000 (14:29 -0700)
commit200939940e040fa11609956a09c78a5782310c61
tree5ee5aa0fcb81e24099baab8f16af0fb7405a0de2
parent64577407085b7b117971f2bf35b0ef3ccd9c89f1
target: Refactor transport_generic_get_mem to target_alloc_sgl

This patch refactors transport_generic_get_mem() to target_alloc_sgl()
for accepting **sgl, *nents, length and zero_page as function parameters
in order to be used for both se_cmd->t_data_sg + se_cmd->t_bidi_data_sg
allocations.

Reported-by: Christoph Hellwig <hch@lst.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Martin Petersen <martin.petersen@oracle.com>
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: James Bottomley <JBottomley@Parallels.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Nicholas Bellinger <nab@daterainc.com>
drivers/target/target_core_transport.c