From 4174fd6c88aa9af3371d80910656d55837a5318b Mon Sep 17 00:00:00 2001 From: pschwan Date: Thu, 26 Sep 2002 20:56:00 +0000 Subject: [PATCH] b=611336 Until we really fix 611336 to never send larger IOV requests than the server can handle, we should at least avoid _crashing_ the server. --- lustre/ost/ost_handler.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 2389655..35a5360 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -289,9 +289,13 @@ out_bulk: out_local: OBD_FREE(local_nb, sizeof(*local_nb) * niocount); out: - if (rc) + if (rc) { + /* It's a lot of work to delay allocating the reply, and a lot + * less work to just free it here. */ + OBD_FREE(req->rq_repmsg, req->rq_replen); + req->rq_repmsg = NULL; ptlrpc_error(req->rq_svc, req); - else + } else ptlrpc_reply(req->rq_svc, req); RETURN(rc); } @@ -410,9 +414,11 @@ out_free: OBD_FREE(local_nb, niocount * sizeof(*local_nb)); out: if (!reply_sent) { - if (rc) + if (rc) { + OBD_FREE(req->rq_repmsg, req->rq_replen); + req->rq_repmsg = NULL; ptlrpc_error(req->rq_svc, req); - else + } else ptlrpc_reply(req->rq_svc, req); } return rc; -- 1.8.3.1