[rds-commits] zab commits r89 - trunk/linux/net/rds

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Wed May 31 18:47:33 CDT 2006


Author: zab
Date: 2006-05-31 18:47:31 -0500 (Wed, 31 May 2006)
New Revision: 89

Modified:
   trunk/linux/net/rds/rds.h
   trunk/linux/net/rds/recv.c
   trunk/linux/net/rds/tcp_recv.c
Log:
rds_recv_incoming no longer allocates and returns void


Modified: trunk/linux/net/rds/rds.h
===================================================================
--- trunk/linux/net/rds/rds.h	2006-05-31 23:27:10 UTC (rev 88)
+++ trunk/linux/net/rds/rds.h	2006-05-31 23:47:31 UTC (rev 89)
@@ -248,8 +248,8 @@
 void rds_inc_addref(struct rds_incoming *inc);
 void rds_inc_put(struct rds_incoming *inc);
 void rds_inc_ack(struct rds_incoming *inc, gfp_t gfp, enum km_type km);
-int rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
-		      struct rds_incoming *inc, gfp_t gfp, enum km_type km);
+void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
+		       struct rds_incoming *inc, gfp_t gfp, enum km_type km);
 int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
 		size_t size, int msg_flags);
 void rds_clear_recv_queue(struct rds_sock *rs);

Modified: trunk/linux/net/rds/recv.c
===================================================================
--- trunk/linux/net/rds/recv.c	2006-05-31 23:27:10 UTC (rev 88)
+++ trunk/linux/net/rds/recv.c	2006-05-31 23:47:31 UTC (rev 89)
@@ -73,15 +73,14 @@
  * conn.  This lets loopback, who only has one conn for both directions,
  * tell us which roles the addrs in the conn are playing for this message.
  */
-int rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
-		      struct rds_incoming *inc, gfp_t gfp, enum km_type km)
+void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
+		       struct rds_incoming *inc, gfp_t gfp, enum km_type km)
 {
 	int is_eom = inc->i_hdr.h_flags & RDS_HEAD_FLAG_EOM;
 	int is_frag = inc->i_hdr.h_flags & RDS_HEAD_FLAG_FRAG;
 	struct rds_sock *rs = NULL;
 	struct sock *sk;
 	unsigned long flags;
-	int ret = 0;
 	int ack = 0;
 
 	inc->i_conn = conn;
@@ -146,7 +145,6 @@
 		rs = rds_find_bound(daddr, inc->i_hdr.h_dport);
 		if (rs == NULL) {
 			ack = 1;
-			ret = 0;
 			goto out;
 		}
 		rds_inc_addref(inc);
@@ -184,7 +182,6 @@
 		rds_sock_put(rs);
 	if (ack)
 		rds_inc_ack(inc, gfp, km);
-	return ret;
 }
 
 /*

Modified: trunk/linux/net/rds/tcp_recv.c
===================================================================
--- trunk/linux/net/rds/tcp_recv.c	2006-05-31 23:27:10 UTC (rev 88)
+++ trunk/linux/net/rds/tcp_recv.c	2006-05-31 23:47:31 UTC (rev 89)
@@ -155,7 +155,6 @@
 	struct rds_tcp_incoming *tinc = tc->t_tinc;
 	struct sk_buff *clone;
 	size_t left = len, to_copy;
-	int ret;
 
 	pr_debug("tcp data tc %p skb %p offset %u len %zu\n", tc, skb, offset,
 		 len);
@@ -226,15 +225,10 @@
 		}
 
 		if (tc->t_tinc_hdr_rem == 0 && tc->t_tinc_data_rem == 0) {
-			ret = rds_recv_incoming(tc->t_conn, 
-						tc->t_conn->c_faddr,
-						tc->t_conn->c_laddr,
-						&tinc->ti_inc,
-						arg->gfp, arg->km);
-			if (ret) {
-				desc->error = ret;
-				goto out;
-			}
+			rds_recv_incoming(tc->t_conn, tc->t_conn->c_faddr,
+					  tc->t_conn->c_laddr, &tinc->ti_inc,
+					  arg->gfp, arg->km);
+
 			tc->t_tinc_hdr_rem = sizeof(struct rds_header);
 			tc->t_tinc_data_rem = 0;
 			tc->t_tinc = NULL;




More information about the rds-commits mailing list