Skip to contentSkip to conversation

ub-fix-up-the-conversion-to-sg_init_table.patch for 2.6.24.y stable-queue

2.6.24.y stable Oliver Pinter 1 participant 1 message Mar 7, 2008 Block layer

lore
Share & tools
lore
#0 lore raw

hi patch for 2.6.24.y
---

Quoted 1 line

From 541645be8bbb67d39113096263dcf00615d789e3 Mon Sep 17 00:00:00 2001

From: Pete Zaitcev <[email protected]>
Date: Sat, 9 Feb 2008 00:10:17 -0800
Subject: [PATCH] ub: fix up the conversion to sg_init_table()

drivers/block/ub.c +1 -1
index a70c1c2..c452e2d 100644
@@ -657,7 +657,6 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq)
 	if ((cmd = ub_get_cmd(lun)) == NULL)
 		return -1;
 	memset(cmd, 0, sizeof(struct ub_scsi_cmd));
-	sg_init_table(cmd->sgv, UB_MAX_REQ_SG);
 
 	blkdev_dequeue_request(rq);
 
@@ -668,6 +667,7 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq)
 	/*
 	 * get scatterlist from block layer
 	 */
+	sg_init_table(&urq->sgv[0], UB_MAX_REQ_SG);
 	n_elem = blk_rq_map_sg(lun->disk->queue, rq, &urq->sgv[0]);
 	if (n_elem < 0) {
 		/* Impossible, because blk_rq_map_sg should not hit ENOMEM. */

---
thanks,
Oliver

-------------------------------------------------------

Signature · 2 lines
thanks,
Oliver