Whamcloud - gitweb
Branch b1_8_gate
authorjohann <johann>
Mon, 6 Oct 2008 12:15:50 +0000 (12:15 +0000)
committerjohann <johann>
Mon, 6 Oct 2008 12:15:50 +0000 (12:15 +0000)
b=17261
i=shadow
i=umka

prevent ptlrpc_queue_wait() from looping indefinitely because of ENOMEM.

lustre/ptlrpc/client.c

index 60bb13a..9299ac6 100644 (file)
@@ -1914,8 +1914,8 @@ restart:
         if ((brc == -ETIMEDOUT) && !ptlrpc_expire_one_request(req)) {
                 /* Wait forever for reconnect / replay or failure */
                 lwi = LWI_INTR(interrupted_request, req);
-                rc = l_wait_event(req->rq_reply_waitq, ptlrpc_check_reply(req),
-                                  &lwi);
+                brc = l_wait_event(req->rq_reply_waitq, ptlrpc_check_reply(req),
+                                   &lwi);
         }
 
         CDEBUG(D_RPCTRACE, "Completed RPC pname:cluuid:pid:xid:nid:opc "
@@ -1937,7 +1937,7 @@ restart:
         if (req->rq_err) {
                 DEBUG_REQ(D_RPCTRACE, req, "err rc=%d status=%d",
                           rc, req->rq_status);
-                GOTO(out, rc = -EIO);
+                GOTO(out, rc = rc ? rc : -EIO);
         }
 
         if (req->rq_intr) {