From 5ed7959ede0936c55e50421a53f153b17080e876 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 15 Nov 2007 09:13:11 +0100 Subject: SG: Convert SCSI to use scatterlist helpers for sg chaining Also change scsi_alloc_sgtable() to just return 0/failure, since it maps to the command passed in. ->request_buffer is now no longer needed, once drivers are adapted to use scsi_sglist() it can be killed. Signed-off-by: Jens Axboe --- drivers/scsi/scsi_tgt_lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/scsi/scsi_tgt_lib.c') diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c index 93ece8f4e5de..01e03f3f6ffa 100644 --- a/drivers/scsi/scsi_tgt_lib.c +++ b/drivers/scsi/scsi_tgt_lib.c @@ -359,8 +359,7 @@ static int scsi_tgt_init_cmd(struct scsi_cmnd *cmd, gfp_t gfp_mask) int count; cmd->use_sg = rq->nr_phys_segments; - cmd->request_buffer = scsi_alloc_sgtable(cmd, gfp_mask); - if (!cmd->request_buffer) + if (scsi_alloc_sgtable(cmd, gfp_mask)) return -ENOMEM; cmd->request_bufflen = rq->data_len; -- cgit v1.2.3