From 362dc85c7f8d1eeb9f7c093ed0de2346f66b5367 Mon Sep 17 00:00:00 2001 From: tappro Date: Sun, 22 Oct 2006 08:23:47 +0000 Subject: [PATCH] - use full_name_hash() --- lustre/mdd/mdd_lock.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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, -- 1.8.3.1