tree 51249a9aa0443133c0c8eb88c127cf98bed9b37f
parent 2f4701d8274c8663f5c50323dc72fefa24b55091
author Chen, Kenneth W <[EMAIL PROTECTED]> Wed, 13 Jul 2005 07:06:14 -0700
committer James Bottomley <[EMAIL PROTECTED](none)> Thu, 14 Jul 2005 19:24:12 
-0400

[SCSI] Redundant memset in scsi_alloc_sgtable

scsi_init_io calls scsi_alloc_sgtable and then calls blk_rq_map_sg
to initialize the scatterlist structure.  blk_rq_map_sg() already
memset the structure for every new segment.  That makes the memset
in scsi_alloc_sgtable unnecessary.

Patch to delete the extra memset in scsi_alloc_sgtable.  Tested on
a x86_64 machine.  Looks stable to me.

Signed-off-by: Ken Chen <[EMAIL PROTECTED]>
Signed-off-by: James Bottomley <[EMAIL PROTECTED]>

 drivers/scsi/scsi_lib.c |    2 --
 1 files changed, 2 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -614,8 +614,6 @@ static struct scatterlist *scsi_alloc_sg
 
        sgp = scsi_sg_pools + cmd->sglist_len;
        sgl = mempool_alloc(sgp->pool, gfp_mask);
-       if (sgl)
-               memset(sgl, 0, sgp->size);
        return sgl;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to