X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre_lmv.h;h=f9369738010121f2d14174a22041175a950fdb67;hb=2270ad3c85802d5fcd3cfcbd8bd109991d8d686f;hp=6c13fe7721474cbc209a4b2dc92c19a1f1373d1b;hpb=8f27184b14a192848429e52ac234805c324e1f7a;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre_lmv.h b/lustre/include/lustre_lmv.h index 6c13fe7..f936973 100644 --- a/lustre/include/lustre_lmv.h +++ b/lustre/include/lustre_lmv.h @@ -20,7 +20,7 @@ * GPL HEADER END */ /* - * Copyright (c) 2014, Intel Corporation. + * Copyright (c) 2014, 2016, Intel Corporation. */ /* * lustre/include/lustre_lmv.h @@ -130,13 +130,11 @@ lmv_hash_all_chars(unsigned int count, const char *name, int namelen) static inline unsigned int lmv_hash_fnv1a(unsigned int count, const char *name, int namelen) { - __u64 hash; + __u64 hash; hash = lustre_hash_fnv_1a_64(name, namelen); - hash = hash % count; - - return hash; + return do_div(hash, count); } static inline int lmv_name_to_stripe_index(__u32 lmv_hash_type,