Whamcloud - gitweb
LU-8091 mount: error out properly in server_lsi2mti()
[fs/lustre-release.git] / lustre / quota / lquota_entry.c
index 8007f16..38324e9 100644 (file)
@@ -20,7 +20,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2015, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
@@ -35,8 +35,8 @@
 #include "lquota_internal.h"
 
 static int hash_lqs_cur_bits = HASH_LQE_CUR_BITS;
-CFS_MODULE_PARM(hash_lqs_cur_bits, "i", int, 0444,
-                "the current bits of lqe hash");
+module_param(hash_lqs_cur_bits, int, 0444);
+MODULE_PARM_DESC(hash_lqs_cur_bits, "the current bits of lqe hash");
 
 static unsigned
 lqe64_hash_hash(struct cfs_hash *hs, const void *key, unsigned mask)
@@ -217,7 +217,7 @@ struct lquota_site *lquota_site_alloc(const struct lu_env *env, void *parent,
 
        /* allocate hash table */
        memset(hashname, 0, sizeof(hashname));
-       sprintf(hashname, "LQUOTA_HASH%u", qtype);
+       snprintf(hashname, sizeof(hashname), "LQUOTA_HASH%hu", qtype);
        site->lqs_hash= cfs_hash_create(hashname, hash_lqs_cur_bits,
                                        HASH_LQE_MAX_BITS,
                                        min(hash_lqs_cur_bits,