[rds-devel] [PATCH 02/19] Introduce a helper routine to retrieve struct net from a RDS connection, it will be used in many places.

Jie Liu jeff.liu at oracle.com
Sun Oct 7 05:14:01 PDT 2012


Signed-off-by: Jie Liu <jeff.liu at oracle.com>
---
 net/rds/rds.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/rds/rds.h b/net/rds/rds.h
index 9c839d0..3bad14f 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -131,6 +131,11 @@ struct rds_connection {
 	unsigned int		c_version;
 };
 
+static inline struct net *rds_conn_to_net(struct rds_connection *conn)
+{
+	return conn->net;
+}
+
 #define RDS_FLAG_CONG_BITMAP	0x01
 #define RDS_FLAG_ACK_REQUIRED	0x02
 #define RDS_FLAG_RETRANSMITTED	0x04
-- 
1.7.4.1




More information about the rds-devel mailing list