From befe8a46f5dbcfd9713d7fb7895b742f776efbe5 Mon Sep 17 00:00:00 2001 From: green Date: Mon, 4 Apr 2005 08:39:27 +0000 Subject: [PATCH] b=6027 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 95cd361..0b75174 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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)); -- 1.8.3.1