From: Landen Date: Mon, 29 Nov 2010 08:07:11 +0000 (+0800) Subject: b=23913 fix "ASSERTION(!cfs_list_empty(&dquot->dq_hash)) failed" X-Git-Tag: 1.8.5.51~26 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=9491d5d931407ccf68d95932ca4ea3c545c6f86d;p=fs%2Flustre-release.git 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 5cec4e7..fc9106f 100644 --- a/lustre/quota/quota_master.c +++ b/lustre/quota/quota_master.c @@ -217,7 +217,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)); } @@ -438,6 +438,10 @@ out: dqacq_adjust_qunit_sz(obd, qdata->qd_id, QDATA_IS_GRP(qdata), QDATA_IS_BLK(qdata)); + 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 || IS_ERR(lqs)) {