aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-12-18 12:25:19 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-08 16:03:44 +0100
commit0aa211e39857f17e24126c47f6e3fe3b971344b3 (patch)
treef09add87abb47f1fe670dfb97d3e3d19d2007386 /drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
parentstaging: lustre: obd_mount: fix possible race with module unload. (diff)
downloadlinux-dev-0aa211e39857f17e24126c47f6e3fe3b971344b3.tar.xz
linux-dev-0aa211e39857f17e24126c47f6e3fe3b971344b3.zip
staging: lustre: libcfs: use a workqueue for rehash work.
lustre has a work-item queuing scheme that provides the same functionality as linux work_queues. To make the code easier for linux devs to follow, change to use work_queues. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h')
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index 5a27220cc608..0506f1d45757 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -248,7 +248,7 @@ struct cfs_hash {
/** # of iterators (caller of cfs_hash_for_each_*) */
u32 hs_iterators;
/** rehash workitem */
- struct cfs_workitem hs_rehash_wi;
+ struct work_struct hs_rehash_work;
/** refcount on this hash table */
atomic_t hs_refcount;
/** rehash buckets-table */
@@ -265,7 +265,7 @@ struct cfs_hash {
/** bits when we found the max depth */
unsigned int hs_dep_bits;
/** workitem to output max depth */
- struct cfs_workitem hs_dep_wi;
+ struct work_struct hs_dep_work;
#endif
/** name of htable */
char hs_name[0];
@@ -738,7 +738,7 @@ u64 cfs_hash_size_get(struct cfs_hash *hs);
*/
void cfs_hash_rehash_cancel_locked(struct cfs_hash *hs);
void cfs_hash_rehash_cancel(struct cfs_hash *hs);
-int cfs_hash_rehash(struct cfs_hash *hs, int do_rehash);
+void cfs_hash_rehash(struct cfs_hash *hs, int do_rehash);
void cfs_hash_rehash_key(struct cfs_hash *hs, const void *old_key,
void *new_key, struct hlist_node *hnode);