diff options
author | Pete Zaitcev <zaitcev@redhat.com> | 2008-02-09 03:10:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-09 14:08:33 -0500 |
commit | 541645be8bbb67d39113096263dcf00615d789e3 (patch) | |
tree | e9c970d9e841c96ff09c7cec5514860b48cfc945 /drivers/block | |
parent | f6a4c8bdb30370991905941ddf85d28dde7370b1 (diff) |
ub: fix up the conversion to sg_init_table()
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: "Oliver Pinter" <oliver.pntr@gmail.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/ub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index a70c1c29a7aa..c452e2d355ee 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -657,7 +657,6 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq) | |||
657 | if ((cmd = ub_get_cmd(lun)) == NULL) | 657 | if ((cmd = ub_get_cmd(lun)) == NULL) |
658 | return -1; | 658 | return -1; |
659 | memset(cmd, 0, sizeof(struct ub_scsi_cmd)); | 659 | memset(cmd, 0, sizeof(struct ub_scsi_cmd)); |
660 | sg_init_table(cmd->sgv, UB_MAX_REQ_SG); | ||
661 | 660 | ||
662 | blkdev_dequeue_request(rq); | 661 | blkdev_dequeue_request(rq); |
663 | 662 | ||
@@ -668,6 +667,7 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq) | |||
668 | /* | 667 | /* |
669 | * get scatterlist from block layer | 668 | * get scatterlist from block layer |
670 | */ | 669 | */ |
670 | sg_init_table(&urq->sgv[0], UB_MAX_REQ_SG); | ||
671 | n_elem = blk_rq_map_sg(lun->disk->queue, rq, &urq->sgv[0]); | 671 | n_elem = blk_rq_map_sg(lun->disk->queue, rq, &urq->sgv[0]); |
672 | if (n_elem < 0) { | 672 | if (n_elem < 0) { |
673 | /* Impossible, because blk_rq_map_sg should not hit ENOMEM. */ | 673 | /* Impossible, because blk_rq_map_sg should not hit ENOMEM. */ |