From 3c897856b60dd863e44eb9c28e4e5031180e6513 Mon Sep 17 00:00:00 2001 From: Landen Date: Tue, 2 Nov 2010 15:02:52 +0800 Subject: [PATCH] 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 --- lustre/quota/quota_master.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 1.8.3.1