+ down(&mds->mds_qonoff_sem);
+ rc2 = mds_admin_quota_on(obd, oqctl);
+ if (rc2 && rc2 != -EALREADY) {
+ CWARN("mds quota[%d] is failed to be on for %d\n", oqctl->qc_type, rc2);
+ GOTO(out, rc2);
+ }
+
+ rc1 = fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
+ if (!rc1) {
+ qctxt->lqc_flags |= UGQUOTA2LQC(oqctl->qc_type);
+ } else if (rc1 == -EBUSY && quota_is_on(qctxt, oqctl)) {
+ CWARN("mds local quota[%d] is on already\n", oqctl->qc_type);
+ rc1 = -EALREADY;
+ } else {
+ if (rc2 != -EALREADY) {
+ CWARN("mds local quota[%d] is failed to be on for %d\n",
+ oqctl->qc_type, rc1);
+ oqctl->qc_cmd = Q_QUOTAOFF;
+ mds_admin_quota_off(obd, oqctl);
+ oqctl->qc_cmd = Q_QUOTAON;
+ }
+ GOTO(out, rc1);
+ }