Whamcloud - gitweb
b=6027
authorgreen <green>
Mon, 4 Apr 2005 08:39:27 +0000 (08:39 +0000)
committergreen <green>
Mon, 4 Apr 2005 08:39:27 +0000 (08:39 +0000)
fix the conditions to take into account quota code requirements to
set "out of quota" flags in osc. (Needed to correctly return -EDQUOT errors
to userspace)

lustre/osc/osc_request.c

index 95cd361..0b75174 100644 (file)
@@ -868,7 +868,7 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, struct obdo *oa,
         struct ost_body *body;
         ENTRY;
 
-        if (rc < 0)
+        if (rc < 0 && rc != -EDQUOT)
                 RETURN(rc);
 
         body = lustre_swab_repbuf(req, 0, sizeof(*body), lustre_swab_ost_body);
@@ -883,6 +883,9 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, struct obdo *oa,
                 osc_set_quota_flag(cli, body->oa.o_uid, body->oa.o_gid, 
                                    body->oa.o_valid, body->oa.o_flags);
 
+        if (rc < 0)
+                RETURN(rc);
+
         osc_update_grant(cli, body);
         memcpy(oa, &body->oa, sizeof(*oa));