OSDN Git Service

scsi: target/core: Use sg_alloc_table() instead of open-coding it
authorBart Van Assche <bvanassche@acm.org>
Mon, 15 Oct 2018 15:51:38 +0000 (08:51 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Oct 2018 05:13:35 +0000 (01:13 -0400)
commit81b6ca6dbada186d0d41c67db8d8eb223a64a56f
treedff01edd6f5d3f8a9f1056175055532cc02574ac
parent80b045b385cfef10939c913fbfeb19ce5491c1f2
scsi: target/core: Use sg_alloc_table() instead of open-coding it

The purpose of sg_alloc_table() is to allocate and initialize an
sg-list. Use that function instead of open-coding it. This patch will
make it easier to share code for caching sg-list allocations between the
SCSI and NVMe target cores.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_sbc.c