X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fquota%2Flquota_entry.c;h=3194bfcf88690b1d4ac73b3532457c04e33f17e8;hb=70e9d4ecc9130aeed1260d78cd8b33a5cde6edd7;hp=73c3d056946edd73580651269e037784775dbe3b;hpb=a001ce6f192f2bb284980d3bfcf94f9df1d15ca6;p=fs%2Flustre-release.git diff --git a/lustre/quota/lquota_entry.c b/lustre/quota/lquota_entry.c index 73c3d05..3194bfc 100644 --- a/lustre/quota/lquota_entry.c +++ b/lustre/quota/lquota_entry.c @@ -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 @@ -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) @@ -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)); }