Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / quota / quota_master.c
index f007b68..68e339c 100644 (file)
@@ -48,13 +48,13 @@ int lustre_dquot_init(void)
 
         LASSERT(lustre_dquot_cachep == NULL);
         lustre_dquot_cachep = cfs_mem_cache_create("lustre_dquot_cache",
-                                                sizeof(struct lustre_dquot),
-                                                0, 0);
+                                                   sizeof(struct lustre_dquot),
+                                                   0, 0);
         if (!lustre_dquot_cachep)
                 return (-ENOMEM);
 
         for (i = 0; i < NR_DQHASH; i++) {
-                INIT_LIST_HEAD(lustre_dquot_hash + i);
+                CFS_INIT_LIST_HEAD(lustre_dquot_hash + i);
         }
         RETURN(0);
 }
@@ -116,7 +116,7 @@ static struct lustre_dquot *alloc_dquot(struct lustre_quota_info *lqi,
         if (dquot == NULL)
                 RETURN(NULL);
 
-        INIT_LIST_HEAD(&dquot->dq_hash);
+        CFS_INIT_LIST_HEAD(&dquot->dq_hash);
         init_mutex_locked(&dquot->dq_sem);
         dquot->dq_refcnt = 1;
         dquot->dq_info = lqi;
@@ -212,7 +212,8 @@ int dqacq_handler(struct obd_device *obd, struct qunit_data *qdata, int opc)
         int rc = 0;
         ENTRY;
 
-        OBD_FAIL_RETURN(OBD_FAIL_OBD_DQACQ, -EIO);
+        if (OBD_FAIL_CHECK(OBD_FAIL_OBD_DQACQ))
+                RETURN(-EIO);
 
         dquot = lustre_dqget(obd, info, qdata->qd_id, qdata_type);
         if (IS_ERR(dquot))
@@ -335,7 +336,7 @@ int filter_quota_adjust(struct obd_device *obd, unsigned int qcids[],
         int rc2 = 0;
         ENTRY;
 
-        if (rc && rc != -EDQUOT && rc != ENOLCK)
+        if (rc && rc != -EDQUOT)
                 RETURN(0);
 
         switch (opc) {
@@ -1064,7 +1065,7 @@ static int qmaster_recovery_main(void *arg)
                         up(&mds->mds_qonoff_sem);
                         continue;
                 }
-                INIT_LIST_HEAD(&id_list);
+                CFS_INIT_LIST_HEAD(&id_list);
                 rc = fsfilt_qids(obd, qinfo->qi_files[type], NULL, type, 
                                  &id_list);
                 up(&mds->mds_qonoff_sem);