Whamcloud - gitweb
LU-4362 libcfs: wrong parameter to cfs_hash_keycpy
authorLiang Zhen <liang.zhen@intel.com>
Mon, 9 Dec 2013 12:39:35 +0000 (20:39 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 30 Dec 2013 22:43:05 +0000 (17:43 -0500)
cfs_hash_rehash_key() passed wrong parameter to cfs_hash_keycpy,
hnode should be the second parameter not the third one.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: I44f73e4d2ffdeab5b021d49642598e939ebacee5
Reviewed-on: http://review.whamcloud.com/8509
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
libcfs/libcfs/hash.c

index bb3ab35..e77e148 100644 (file)
@@ -2020,7 +2020,7 @@ void cfs_hash_rehash_key(cfs_hash_t *hs, const void *old_key,
         }
         /* overwrite key inside locks, otherwise may screw up with
          * other operations, i.e: rehash */
-        cfs_hash_keycpy(hs, new_key, hnode);
+        cfs_hash_keycpy(hs, hnode, new_key);
 
         cfs_hash_multi_bd_unlock(hs, bds, 3, 1);
         cfs_hash_unlock(hs, 0);