diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/libcfs/hash.c')
-rw-r--r-- | drivers/staging/lustre/lustre/libcfs/hash.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c b/drivers/staging/lustre/lustre/libcfs/hash.c index 3b67b7b6428c..2d1e6729e996 100644 --- a/drivers/staging/lustre/lustre/libcfs/hash.c +++ b/drivers/staging/lustre/lustre/libcfs/hash.c @@ -1121,8 +1121,7 @@ cfs_hash_destroy(struct cfs_hash *hs) cfs_hash_bd_for_each_hlist(hs, &bd, hhead) { hlist_for_each_safe(hnode, pos, hhead) { LASSERTF(!cfs_hash_with_assert_empty(hs), - "hash %s bucket %u(%u) is not " - " empty: %u items left\n", + "hash %s bucket %u(%u) is not empty: %u items left\n", hs->hs_name, bd.bd_bucket->hsb_index, bd.bd_offset, bd.bd_bucket->hsb_count); /* can't assert key valicate, because we @@ -1371,8 +1370,7 @@ cfs_hash_lookup(struct cfs_hash *hs, const void *key) EXPORT_SYMBOL(cfs_hash_lookup); static void -cfs_hash_for_each_enter(struct cfs_hash *hs) -{ +cfs_hash_for_each_enter(struct cfs_hash *hs) { LASSERT(!cfs_hash_is_exiting(hs)); if (!cfs_hash_with_rehash(hs)) @@ -1397,8 +1395,7 @@ cfs_hash_for_each_enter(struct cfs_hash *hs) } static void -cfs_hash_for_each_exit(struct cfs_hash *hs) -{ +cfs_hash_for_each_exit(struct cfs_hash *hs) { int remained; int bits; @@ -1429,8 +1426,7 @@ cfs_hash_for_each_exit(struct cfs_hash *hs) */ static __u64 cfs_hash_for_each_tight(struct cfs_hash *hs, cfs_hash_for_each_cb_t func, - void *data, int remove_safe) -{ + void *data, int remove_safe) { struct hlist_node *hnode; struct hlist_node *pos; struct cfs_hash_bd bd; @@ -1523,8 +1519,7 @@ EXPORT_SYMBOL(cfs_hash_for_each); void cfs_hash_for_each_safe(struct cfs_hash *hs, - cfs_hash_for_each_cb_t func, void *data) -{ + cfs_hash_for_each_cb_t func, void *data) { cfs_hash_for_each_tight(hs, func, data, 1); } EXPORT_SYMBOL(cfs_hash_for_each_safe); @@ -1572,8 +1567,8 @@ EXPORT_SYMBOL(cfs_hash_size_get); * two cases, so iteration has to be stopped on change. */ static int -cfs_hash_for_each_relax(struct cfs_hash *hs, cfs_hash_for_each_cb_t func, void *data) -{ +cfs_hash_for_each_relax(struct cfs_hash *hs, cfs_hash_for_each_cb_t func, + void *data) { struct hlist_node *hnode; struct hlist_node *tmp; struct cfs_hash_bd bd; @@ -1634,8 +1629,7 @@ cfs_hash_for_each_relax(struct cfs_hash *hs, cfs_hash_for_each_cb_t func, void * int cfs_hash_for_each_nolock(struct cfs_hash *hs, - cfs_hash_for_each_cb_t func, void *data) -{ + cfs_hash_for_each_cb_t func, void *data) { if (cfs_hash_with_no_lock(hs) || cfs_hash_with_rehash_key(hs) || !cfs_hash_with_no_itemref(hs)) @@ -1667,8 +1661,7 @@ EXPORT_SYMBOL(cfs_hash_for_each_nolock); */ int cfs_hash_for_each_empty(struct cfs_hash *hs, - cfs_hash_for_each_cb_t func, void *data) -{ + cfs_hash_for_each_cb_t func, void *data) { unsigned i = 0; if (cfs_hash_with_no_lock(hs)) @@ -1726,8 +1719,7 @@ EXPORT_SYMBOL(cfs_hash_hlist_for_each); */ void cfs_hash_for_each_key(struct cfs_hash *hs, const void *key, - cfs_hash_for_each_cb_t func, void *data) -{ + cfs_hash_for_each_cb_t func, void *data) { struct hlist_node *hnode; struct cfs_hash_bd bds[2]; unsigned i; |