Whamcloud - gitweb
LU-12885 mds: add enums for MDS_ATTR flags
[fs/lustre-release.git] / lustre / quota / qmt_entry.c
index da29dc4..a1eb9c7 100644 (file)
@@ -186,7 +186,7 @@ static void qmt_lqe_debug(struct lquota_entry *lqe, void *arg,
 /*
  * Vector of quota entry operations supported on the master
  */
-struct lquota_entry_operations qmt_lqe_ops = {
+const struct lquota_entry_operations qmt_lqe_ops = {
        .lqe_init       = qmt_lqe_init,
        .lqe_read       = qmt_lqe_read,
        .lqe_debug      = qmt_lqe_debug,
@@ -252,7 +252,8 @@ struct thandle *qmt_trans_start_with_slv(const struct lu_env *env,
 
        if (slv_obj != NULL) {
                /* reserve credits for slave index update */
-               rc = lquota_disk_declare_write(env, th, slv_obj, &lqe->lqe_id);
+               rc = lquota_disk_declare_write(env, th, slv_obj,
+                                              &lqes[0]->lqe_id);
                if (rc)
                        GOTO(out, rc);
        }
@@ -267,7 +268,7 @@ out:
        if (rc) {
                dt_trans_stop(env, qmt->qmt_child, th);
                th = ERR_PTR(rc);
-               LQUOTA_ERROR(lqe, "failed to slv declare write for "DFID
+               LQUOTA_ERROR(lqes[0], "failed to slv declare write for "DFID
                             ", rc:%d", PFID(lu_object_fid(&slv_obj->do_lu)),
                             rc);
        } else {
@@ -943,7 +944,7 @@ void qti_lqes_fini(const struct lu_env *env)
                         qti->qti_lqes_num * sizeof(struct lquota_entry *));
 }
 
-inline int qti_lqes_min_qunit(const struct lu_env *env)
+int qti_lqes_min_qunit(const struct lu_env *env)
 {
        int i, min, qunit;
 
@@ -956,7 +957,7 @@ inline int qti_lqes_min_qunit(const struct lu_env *env)
        return min;
 }
 
-inline int qti_lqes_edquot(const struct lu_env *env)
+int qti_lqes_edquot(const struct lu_env *env)
 {
        int i;
 
@@ -968,7 +969,7 @@ inline int qti_lqes_edquot(const struct lu_env *env)
        return 0;
 }
 
-inline int qti_lqes_restore_init(const struct lu_env *env)
+int qti_lqes_restore_init(const struct lu_env *env)
 {
        int rc = 0;
 
@@ -982,14 +983,14 @@ inline int qti_lqes_restore_init(const struct lu_env *env)
        return rc;
 }
 
-inline void qti_lqes_restore_fini(const struct lu_env *env)
+void qti_lqes_restore_fini(const struct lu_env *env)
 {
        if (qti_lqes_cnt(env) > QMT_MAX_POOL_NUM)
                OBD_FREE(qmt_info(env)->qti_lqes_rstr,
                         qti_lqes_cnt(env) * sizeof(struct qmt_lqe_restore));
 }
 
-inline void qti_lqes_write_lock(const struct lu_env *env)
+void qti_lqes_write_lock(const struct lu_env *env)
 {
        int i;
 
@@ -997,7 +998,7 @@ inline void qti_lqes_write_lock(const struct lu_env *env)
                lqe_write_lock(qti_lqes(env)[i]);
 }
 
-inline void qti_lqes_write_unlock(const struct lu_env *env)
+void qti_lqes_write_unlock(const struct lu_env *env)
 {
        int i;