patch-2.2.0-pre2 linux/net/sunrpc/xprt.c

Next file: linux/net/wanrouter/wanmain.c
Previous file: linux/net/sunrpc/svc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre1/linux/net/sunrpc/xprt.c linux/net/sunrpc/xprt.c
@@ -543,7 +543,7 @@
 		pkt_cnt++;
 		pkt_len += req->rq_slen + copied;
 		pkt_rtt += jiffies - req->rq_xtime;
-		if (time_after(jiffies, nextstat)) {
+		if (time_before(nextstat, jiffies)) {
 			printk("RPC: %lu %ld cwnd\n", jiffies, xprt->cwnd);
 			printk("RPC: %ld %ld %ld %ld stat\n",
 					jiffies, pkt_cnt, pkt_len, pkt_rtt);
@@ -936,6 +936,7 @@
 	struct rpc_timeout *timeo;
 	struct rpc_rqst	*req = task->tk_rqstp;
 	struct rpc_xprt	*xprt = req->rq_xprt;
+	int status;
 
 	/*DEBUG*/int ac_debug=xprt->snd_sent;
 	
@@ -993,9 +994,17 @@
 	 * the pending list now:
 	 */
 	start_bh_atomic();
-	rpc_add_wait_queue(&xprt->pending, task);
-	task->tk_callback = NULL;
+	status = rpc_add_wait_queue(&xprt->pending, task);
+	if (!status)
+		task->tk_callback = NULL;
 	end_bh_atomic();
+
+	if (status)
+	{
+		printk(KERN_WARNING "RPC: failed to add task to queue: error: %d!\n", status);
+		task->tk_status = status;
+		return;
+	}
 
 	/* Continue transmitting the packet/record. We must be careful
 	 * to cope with writespace callbacks arriving _after_ we have

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov