From: Landen Date: Tue, 2 Nov 2010 07:02:52 +0000 (+0800) Subject: b=23913 fix "ASSERTION(!cfs_list_empty(&dquot->dq_hash)) failed" X-Git-Tag: 2.0.55.0~13 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3c897856b60dd863e44eb9c28e4e5031180e6513 b=23913 fix "ASSERTION(!cfs_list_empty(&dquot->dq_hash)) failed" 1. In an error handling, free_dquot() should be used. 2. Check if quota is on in dqacq_handler() i=johann i=panda --- diff --git a/lustre/quota/quota_master.c b/lustre/quota/quota_master.c index d8d14d7..6397393 100644 --- a/lustre/quota/quota_master.c +++ b/lustre/quota/quota_master.c @@ -215,7 +215,7 @@ static struct lustre_dquot *lustre_dqget(struct obd_device *obd, if (rc) { CERROR("can't read dquot from admin quotafile! " "(rc:%d)\n", rc); - lustre_dqput(dquot); + free_dquot(dquot); RETURN(ERR_PTR(rc)); } else { cfs_write_lock(&dquot_hash_lock); @@ -372,6 +372,10 @@ int dqacq_handler(struct obd_device *obd, struct qunit_data *qdata, int opc) if (OBD_FAIL_CHECK(OBD_FAIL_OBD_DQACQ)) RETURN(-EIO); + if (!ll_sb_has_quota_active(qctxt->lqc_sb, + QDATA_IS_GRP(qdata) ? GRPQUOTA : USRQUOTA)) + RETURN(-EIO); + lqs = quota_search_lqs(LQS_KEY(QDATA_IS_GRP(qdata), qdata->qd_id), qctxt, 0); if (lqs == NULL)