Whamcloud - gitweb
b=22755 Don't leak grant if write failed with EDQUOT
authorAlexander.Zarochentsev <Alexander.Zarochentsev@sun.com>
Tue, 15 Jun 2010 19:00:14 +0000 (23:00 +0400)
committerRobert Read <robert.read@oracle.com>
Tue, 15 Jun 2010 20:46:48 +0000 (13:46 -0700)
a=oleg.drokin
i=di.wang
i=johann

lustre/osc/osc_request.c

index 22bf7d9..157031b 100644 (file)
@@ -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);
         }