From f4dd96f7b27743e568cec519eff0f951c56833c6 Mon Sep 17 00:00:00 2001
From: Andy Grover <andy.grover@oracle.com>
Date: Tue, 12 Jan 2010 14:17:31 -0800
Subject: RDS: make sure all sgs alloced are initialized

rds_message_alloc_sgs() now returns correctly-initialized
sg lists, so calleds need not do this themselves.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
---
 net/rds/message.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'net/rds/message.c')

diff --git a/net/rds/message.c b/net/rds/message.c
index 4352ce79b376..7d678e217820 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -249,7 +249,7 @@ struct scatterlist *rds_message_alloc_sgs(struct rds_message *rm, int nents)
 	WARN_ON(rm->m_used_sgs + nents > rm->m_total_sgs);
 
 	sg_ret = &sg_first[rm->m_used_sgs];
-
+	sg_init_table(sg_ret, nents);
 	rm->m_used_sgs += nents;
 
 	return sg_ret;
-- 
cgit v1.2.3