int ret = 0;
ENTRY;
- if (!ll_sb_any_quota_active(sb))
+ if (!ll_sb_has_quota_active(sb, QDATA_IS_GRP(qdata)))
RETURN(0);
cfs_spin_lock(&qctxt->lqc_lock);
int ret = QUOTA_RET_OK;
ENTRY;
- if (!ll_sb_any_quota_active(sb))
- RETURN(QUOTA_RET_NOQUOTA);
-
/* ignore root user */
if (qdata->qd_id == 0 && QDATA_IS_GRP(qdata) == USRQUOTA)
RETURN(QUOTA_RET_NOLIMIT);
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
struct lustre_qunit_size *lqs = NULL;
+ /* check if quota is enabled */
+ if (!ll_sb_has_quota_active(obt->obt_sb, cnt))
+ continue;
+
lqs = quota_search_lqs(LQS_KEY(cnt, GET_OA_ID(cnt, oa)),
qctxt, 0);
if (IS_ERR(lqs)) {
QDATA_SET_BLK(&qdata[i]);
qdata[i].qd_count = 0;
+ /* check if quota is enabled */
+ if (!ll_sb_has_quota_active(qctxt->lqc_sb, i))
+ continue;
+
/* ignore root user */
if (qdata[i].qd_id == 0 && !QDATA_IS_GRP(&qdata[i]))
continue;
RETURN(0);
for (i = 0; i < MAXQUOTAS; i++) {
+ /* check if quota is enabled */
+ if (!ll_sb_has_quota_active(obd->u.obt.obt_qctxt.lqc_sb, i))
+ continue;
lqs = quota_search_lqs(LQS_KEY(i, id[i]),
&obd->u.obt.obt_qctxt, 0);
if (lqs && !IS_ERR(lqs)) {