if (!ptlrpc_client_receiving_reply(request))
return;
- rc = PtlMDUnlink (request->rq_reply_md_h);
- if (rc == PTL_MD_INVALID) {
- LASSERT (!ptlrpc_client_receiving_reply(request));
- return;
- }
-
- LASSERT (rc == PTL_OK);
+ PtlMDUnlink (request->rq_reply_md_h);
+
+ /* We have to l_wait_event() whatever the result, to give liblustre
+ * a chance to run reply_in_callback() */
if (request->rq_set == NULL)
wq = &request->rq_set->set_waitq;
return; /* never started */
/* The unlink ensures the callback happens ASAP and is the last
- * one. If it fails, it must be because completion just
- * happened. */
+ * one. If it fails, it must be because completion just happened,
+ * but we must still l_wait_event() in this case, to give liblustre
+ * a chance to run server_bulk_callback()*/
- rc = PtlMDUnlink (desc->bd_md_h);
- if (rc == PTL_MD_INVALID) {
- LASSERT(!ptlrpc_bulk_active(desc));
- return;
- }
-
- LASSERT (rc == PTL_OK);
+ PtlMDUnlink (desc->bd_md_h);
for (;;) {
/* Network access will complete in finite time but the HUGE
LASSERT (desc->bd_req == req); /* bd_req NULL until registered */
/* the unlink ensures the callback happens ASAP and is the last
- * one. If it fails, it must be because completion just
- * happened. */
+ * one. If it fails, it must be because completion just happened,
+ * but we must still l_wait_event() in this case to give liblustre
+ * a chance to run client_bulk_callback() */
- rc = PtlMDUnlink (desc->bd_md_h);
- if (rc == PTL_MD_INVALID) {
- LASSERT(!ptlrpc_bulk_active(desc));
- return;
- }
-
- LASSERT (rc == PTL_OK);
+ PtlMDUnlink (desc->bd_md_h);
if (desc->bd_req->rq_set != NULL)
wq = &req->rq_set->set_waitq;