Whamcloud - gitweb
LU-4362 libcfs: wrong parameter to cfs_hash_keycpy 09/8509/2
authorLiang Zhen <liang.zhen@intel.com>
Mon, 9 Dec 2013 12:39:35 +0000 (20:39 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 10 Dec 2013 04:19:22 +0000 (04:19 +0000)
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 e112955..35c64a0 100644 (file)
@@ -2019,7 +2019,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);