X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fquota%2Fquota_adjust_qunit.c;h=1c20d86b8d40c0eb769d594346ccf3980a0b37c9;hb=54721a3902c853dea73bde97a2c93a9618a67018;hp=20ee26b502a1b365f9b4784fff894f662ba55952;hpb=cefa8cda2ba2d288ccaa4ec077a6c627592503ea;p=fs%2Flustre-release.git diff --git a/lustre/quota/quota_adjust_qunit.c b/lustre/quota/quota_adjust_qunit.c index 20ee26b..1c20d86 100644 --- a/lustre/quota/quota_adjust_qunit.c +++ b/lustre/quota/quota_adjust_qunit.c @@ -45,14 +45,10 @@ # include # include # include -# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -# include -# include -# include -# include -# else -# include -# endif +# include +# include +# include +# include #else /* __KERNEL__ */ # include #endif @@ -317,7 +313,7 @@ int filter_quota_adjust_qunit(struct obd_export *exp, struct lustre_quota_ctxt *qctxt) { struct obd_device *obd = exp->exp_obd; - unsigned int uid = 0, gid = 0; + unsigned int id[MAXQUOTAS] = { 0, 0 }; int rc = 0; ENTRY; @@ -329,13 +325,14 @@ int filter_quota_adjust_qunit(struct obd_export *exp, RETURN(rc); } if (QAQ_IS_GRP(oqaq)) - gid = oqaq->qaq_id; + id[GRPQUOTA] = oqaq->qaq_id; else - uid = oqaq->qaq_id; + id[USRQUOTA] = oqaq->qaq_id; if (rc > 0) { - rc = qctxt_adjust_qunit(obd, qctxt, uid, gid, 1, 0, NULL); - if (rc == -EDQUOT || rc == -EBUSY || rc == -EAGAIN) { + rc = qctxt_adjust_qunit(obd, qctxt, id, 1, 0, NULL); + if (rc == -EDQUOT || rc == -EBUSY || + rc == QUOTA_REQ_RETURNED || rc == -EAGAIN) { CDEBUG(D_QUOTA, "rc: %d.\n", rc); rc = 0; }