Whamcloud - gitweb
b=23913 fix "ASSERTION(!cfs_list_empty(&dquot->dq_hash)) failed"
authorLanden <zhiyong.tian@oracle.com>
Mon, 29 Nov 2010 08:07:11 +0000 (16:07 +0800)
committerAndrew Perepechko <andrew.perepechko@oracle.com>
Mon, 29 Nov 2010 13:33:56 +0000 (16:33 +0300)
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

index 5cec4e7..fc9106f 100644 (file)
@@ -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)) {