[rds-devel] [PATCH] RDS: Call sg_init_table() to initialize scatterlists.
Steve Wise
swise at opengridcomputing.com
Tue Jan 13 11:29:20 PST 2009
From: Steve Wise <swise at opengridcomputing.com>
Needed if CONFIG_DEBUG_SG is on.
Signed-off-by: Steve Wise <swise at opengridcomputing.com>
---
drivers/infiniband/ulp/rds/message.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/ulp/rds/message.c b/drivers/infiniband/ulp/rds/message.c
index 23ed71c..5bf9d5a 100644
--- a/drivers/infiniband/ulp/rds/message.c
+++ b/drivers/infiniband/ulp/rds/message.c
@@ -226,6 +226,14 @@ struct rds_message *rds_message_alloc(unsigned int nents, gfp_t gfp)
if (rm == NULL)
goto out;
+#ifdef CONFIG_DEBUG_SG
+{
+ unsigned int i;
+
+ for (i=0; i < nents; i++)
+ rm->m_sg[i].sg_magic = SG_MAGIC;
+}
+#endif
atomic_set(&rm->m_refcount, 1);
INIT_LIST_HEAD(&rm->m_sock_item);
INIT_LIST_HEAD(&rm->m_conn_item);
More information about the rds-devel
mailing list