From a910ca31ed5625f4a1555208694a03eb5d004e4a Mon Sep 17 00:00:00 2001 From: johann Date: Mon, 6 Oct 2008 12:15:52 +0000 Subject: [PATCH] Branch b1_8_gate b=17261 i=shadow i=umka prevent ptlrpc_queue_wait() from looping indefinitely because of ENOMEM. --- lustre/ptlrpc/niobuf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c index 8298e20..9cc79aa 100644 --- a/lustre/ptlrpc/niobuf.c +++ b/lustre/ptlrpc/niobuf.c @@ -482,6 +482,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) request->rq_import->imp_obd->obd_name); /* this prevents us from waiting in ptlrpc_queue_wait */ request->rq_err = 1; + request->rq_status = -ENODEV; RETURN(-ENODEV); } @@ -505,8 +506,12 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) LASSERT (request->rq_replen != 0); if (request->rq_repbuf == NULL) OBD_ALLOC(request->rq_repbuf, request->rq_replen); - if (request->rq_repbuf == NULL) + if (request->rq_repbuf == NULL) { + /* this prevents us from looping in ptlrpc_queue_wait */ + request->rq_err = 1; + request->rq_status = -ENOMEM; GOTO(cleanup_bulk, rc = -ENOMEM); + } request->rq_repmsg = NULL; rc = LNetMEAttach(request->rq_reply_portal,/*XXX FIXME bug 249*/ -- 1.8.3.1