Whamcloud - gitweb
LU-6245 libcfs: cleanup up libcfs hash code for upstream
[fs/lustre-release.git] / lustre / lod / lod_pool.c
index 19e473f..5caef4c 100644 (file)
@@ -140,7 +140,8 @@ static void pool_putref_locked(struct pool_desc *pool)
  *
  * \retval             computed hash value from \a key and limited by \a mask
  */
-static __u32 pool_hashfn(cfs_hash_t *hash_body, const void *key, unsigned mask)
+static __u32 pool_hashfn(struct cfs_hash *hash_body, const void *key,
+                        unsigned mask)
 {
        return cfs_hash_djb2_hash(key, strnlen(key, LOV_MAXPOOLNAME), mask);
 }
@@ -195,7 +196,7 @@ static void *pool_hashobject(struct hlist_node *hnode)
        return hlist_entry(hnode, struct pool_desc, pool_hash);
 }
 
-static void pool_hashrefcount_get(cfs_hash_t *hs, struct hlist_node *hnode)
+static void pool_hashrefcount_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
        struct pool_desc *pool;
 
@@ -203,7 +204,7 @@ static void pool_hashrefcount_get(cfs_hash_t *hs, struct hlist_node *hnode)
        pool_getref(pool);
 }
 
-static void pool_hashrefcount_put_locked(cfs_hash_t *hs,
+static void pool_hashrefcount_put_locked(struct cfs_hash *hs,
                                         struct hlist_node *hnode)
 {
        struct pool_desc *pool;
@@ -212,7 +213,7 @@ static void pool_hashrefcount_put_locked(cfs_hash_t *hs,
        pool_putref_locked(pool);
 }
 
-cfs_hash_ops_t pool_hash_operations = {
+struct cfs_hash_ops pool_hash_operations = {
        .hs_hash        = pool_hashfn,
        .hs_key         = pool_key,
        .hs_keycmp      = pool_hashkey_keycmp,