Whamcloud - gitweb
LU-2766 llite: don't ignore layout for group lock request
[fs/lustre-release.git] / lustre / quota / lquota_entry.c
index 7adbc51..92a9c6e 100644 (file)
@@ -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)
@@ -203,7 +203,8 @@ struct lquota_site *lquota_site_alloc(const struct lu_env *env, void *parent,
        char                     hashname[15];
        ENTRY;
 
-       LASSERT(qtype < MAXQUOTAS);
+       if (qtype >= LL_MAXQUOTAS)
+               RETURN(ERR_PTR(-ENOTSUPP));
 
        OBD_ALLOC_PTR(site);
        if (site == NULL)