Whamcloud - gitweb
LU-7734 lnet: set primary NID in ptlrpc_connection_get()
[fs/lustre-release.git] / lustre / quota / qmt_pool.c
index 47f5b12..3217127 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
@@ -159,7 +159,7 @@ static int qpi_state_seq_show(struct seq_file *m, void *data)
                   atomic_read(&pool->qpi_ref),
                   pool->qpi_least_qunit);
 
-       for (type = 0; type < MAXQUOTAS; type++)
+       for (type = 0; type < LL_MAXQUOTAS; type++)
                seq_printf(m, "    %s:\n"
                           "        #slv: %d\n"
                           "        #lqe: %d\n",
@@ -176,7 +176,8 @@ static int qpi_soft_least_qunit_seq_show(struct seq_file *m, void *data)
        struct qmt_pool_info    *pool = m->private;
        LASSERT(pool != NULL);
 
-       return seq_printf(m, "%lu\n", pool->qpi_soft_least_qunit);
+       seq_printf(m, "%lu\n", pool->qpi_soft_least_qunit);
+       return 0;
 }
 
 static ssize_t
@@ -314,7 +315,7 @@ static void qmt_pool_free(const struct lu_env *env, struct qmt_pool_info *pool)
 
        /* release per-quota type site used to manage quota entries as well as
         * references to global index files */
-       for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+       for (qtype = 0; qtype < LL_MAXQUOTAS; qtype++) {
                /* release lqe storing grace time */
                if (pool->qpi_grace_lqe[qtype] != NULL)
                        lqe_putref(pool->qpi_grace_lqe[qtype]);
@@ -528,7 +529,7 @@ int qmt_pool_prepare(const struct lu_env *env, struct qmt_device *qmt,
                        RETURN(PTR_ERR(obj));
                pool->qpi_root = obj;
 
-               for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
+               for (qtype = 0; qtype < LL_MAXQUOTAS; qtype++) {
                        /* Generating FID of global index in charge of storing
                         * settings for this quota type */
                        lquota_generate_fid(&qti->qti_fid, pool_id, pool_type,