Whamcloud - gitweb
LU-4017 quota: redefine LL_MAXQUOTAS for Lustre
[fs/lustre-release.git] / lustre / quota / lquota_entry.c
index 38324e9..92a9c6e 100644 (file)
@@ -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)