Whamcloud - gitweb
LU-7734 lnet: set primary NID in ptlrpc_connection_get()
[fs/lustre-release.git] / lustre / quota / lquota_entry.c
index 38324e9..3194bfc 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)
@@ -325,7 +326,7 @@ struct lquota_entry *lqe_locate(const struct lu_env *env,
 
        OBD_SLAB_ALLOC_PTR_GFP(new, lqe_kmem, GFP_NOFS);
        if (new == NULL) {
-               CERROR("Fail to allocate lqe for id:"LPU64", "
+               CERROR("Fail to allocate lqe for id:%llu, "
                        "hash:%s\n", qid->qid_uid, site->lqs_hash->hs_name);
                RETURN(ERR_PTR(-ENOMEM));
        }