From 911ffe09d3c330bab2b568a189c33aadf29d24d9 Mon Sep 17 00:00:00 2001 From: "Alexander.Zarochentsev" Date: Tue, 15 Jun 2010 23:00:14 +0400 Subject: [PATCH] b=22755 Don't leak grant if write failed with EDQUOT a=oleg.drokin i=di.wang i=johann --- lustre/osc/osc_request.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 22bf7d9..157031b 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1495,14 +1495,14 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc) } #endif + osc_update_grant(cli, body); + if (rc < 0) RETURN(rc); if (aa->aa_oa->o_valid & OBD_MD_FLCKSUM) client_cksum = aa->aa_oa->o_cksum; /* save for later */ - osc_update_grant(cli, body); - if (lustre_msg_get_opc(req->rq_reqmsg) == OST_WRITE) { if (rc > 0) { CERROR("Unexpected +ve rc %d\n", rc); @@ -1681,7 +1681,7 @@ int osc_brw_redo_request(struct ptlrpc_request *request, ENTRY; if (!osc_should_resend(aa->aa_resends, aa->aa_cli)) { - CERROR("too many resend retries, returning error\n"); + CERROR("too many resent retries, returning error\n"); RETURN(-EIO); } -- 1.8.3.1