From: tappro Date: Sun, 22 Oct 2006 08:23:47 +0000 (+0000) Subject: - use full_name_hash() X-Git-Tag: v1_8_0_110~486^2~394 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=362dc85c7f8d1eeb9f7c093ed0de2346f66b5367;p=fs%2Flustre-release.git - use full_name_hash() --- diff --git a/lustre/mdd/mdd_lock.c b/lustre/mdd/mdd_lock.c index 60f486b..5a5199c 100644 --- a/lustre/mdd/mdd_lock.c +++ b/lustre/mdd/mdd_lock.c @@ -73,16 +73,7 @@ void mdd_pdlock_init(struct mdd_object *obj) unsigned long mdd_name2hash(const char *name) { - unsigned long value = 0; - int namelen = strlen(name); - int i = 0; - /*XXX the hash should be simple, fast but differ from split one - * Current one is just fast solution to see how dynlocks will help */ - while (namelen > i) { - value += name[i] * (i << 7); - i++; - } - return value; + return full_name_hash((unsigned char*)name, strlen(name)); } struct dynlock_handle *mdd_pdo_write_lock(const struct lu_env *env,