From 4d21e22128f95903305340c0ace820583fca6e65 Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Thu, 27 May 2010 18:22:43 +0200 Subject: [PATCH] b=22755 don't leak grant if write failed with EDQUOT i=johann i=wangdi --- lustre/ChangeLog | 4 ++++ lustre/osc/osc_request.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 8beb092..648a7f2 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -50,6 +50,10 @@ Description: The shrink grant feature is still active on the client although the connect flag is not set. Severity : normal +Bugzilla : 22755 +Description: Don't leak grant space if the write failed with quota exceeded. + +Severity : normal Bugzilla : 22610 Description: a race condition could lead to SIGBUS being sent to an application using mmap-ped files from Lustre diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 3676481..44adfc0 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1423,14 +1423,14 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc) body->oa.o_gid, body->oa.o_valid, body->oa.o_flags); + 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); @@ -1596,7 +1596,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