Browse Source

xprtrdma: The transport should not bug-check when a dup reply is received

The client side RDMA transport will bug check if it receives a duplicate
reply, instead we should simply drop the duplicate reply.

Signed-off-by: Tom Tucker <tom@ogc.us>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Tom Tucker 13 years ago
parent
commit
4a6862b364
1 changed files with 7 additions and 2 deletions
  1. 7 2
      net/sunrpc/xprtrdma/rpc_rdma.c

+ 7 - 2
net/sunrpc/xprtrdma/rpc_rdma.c

@@ -771,13 +771,18 @@ repost:
 
 
 	/* get request object */
 	/* get request object */
 	req = rpcr_to_rdmar(rqst);
 	req = rpcr_to_rdmar(rqst);
+	if (req->rl_reply) {
+		spin_unlock(&xprt->transport_lock);
+		dprintk("RPC:       %s: duplicate reply 0x%p to RPC "
+			"request 0x%p: xid 0x%08x\n", __func__, rep, req,
+			headerp->rm_xid);
+		goto repost;
+	}
 
 
 	dprintk("RPC:       %s: reply 0x%p completes request 0x%p\n"
 	dprintk("RPC:       %s: reply 0x%p completes request 0x%p\n"
 		"                   RPC request 0x%p xid 0x%08x\n",
 		"                   RPC request 0x%p xid 0x%08x\n",
 			__func__, rep, req, rqst, headerp->rm_xid);
 			__func__, rep, req, rqst, headerp->rm_xid);
 
 
-	BUG_ON(!req || req->rl_reply);
-
 	/* from here on, the reply is no longer an orphan */
 	/* from here on, the reply is no longer an orphan */
 	req->rl_reply = rep;
 	req->rl_reply = rep;