aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/async-thread.c6
-rw-r--r--fs/btrfs/async-thread.h20
2 files changed, 14 insertions, 12 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c
index a709585e2c97..d8c07e5c1f24 100644
--- a/fs/btrfs/async-thread.c
+++ b/fs/btrfs/async-thread.c
@@ -255,9 +255,9 @@ static void normal_work_helper(struct work_struct *arg)
255} 255}
256 256
257void btrfs_init_work(struct btrfs_work *work, 257void btrfs_init_work(struct btrfs_work *work,
258 void (*func)(struct btrfs_work *), 258 btrfs_func_t func,
259 void (*ordered_func)(struct btrfs_work *), 259 btrfs_func_t ordered_func,
260 void (*ordered_free)(struct btrfs_work *)) 260 btrfs_func_t ordered_free)
261{ 261{
262 work->func = func; 262 work->func = func;
263 work->ordered_func = ordered_func; 263 work->ordered_func = ordered_func;
diff --git a/fs/btrfs/async-thread.h b/fs/btrfs/async-thread.h
index 08d717476227..0a891cdc4c28 100644
--- a/fs/btrfs/async-thread.h
+++ b/fs/btrfs/async-thread.h
@@ -23,11 +23,13 @@
23struct btrfs_workqueue; 23struct btrfs_workqueue;
24/* Internal use only */ 24/* Internal use only */
25struct __btrfs_workqueue; 25struct __btrfs_workqueue;
26struct btrfs_work;
27typedef void (*btrfs_func_t)(struct btrfs_work *arg);
26 28
27struct btrfs_work { 29struct btrfs_work {
28 void (*func)(struct btrfs_work *arg); 30 btrfs_func_t func;
29 void (*ordered_func)(struct btrfs_work *arg); 31 btrfs_func_t ordered_func;
30 void (*ordered_free)(struct btrfs_work *arg); 32 btrfs_func_t ordered_free;
31 33
32 /* Don't touch things below */ 34 /* Don't touch things below */
33 struct work_struct normal_work; 35 struct work_struct normal_work;
@@ -37,13 +39,13 @@ struct btrfs_work {
37}; 39};
38 40
39struct btrfs_workqueue *btrfs_alloc_workqueue(char *name, 41struct btrfs_workqueue *btrfs_alloc_workqueue(char *name,
40 int flags, 42 int flags,
41 int max_active, 43 int max_active,
42 int thresh); 44 int thresh);
43void btrfs_init_work(struct btrfs_work *work, 45void btrfs_init_work(struct btrfs_work *work,
44 void (*func)(struct btrfs_work *), 46 btrfs_func_t func,
45 void (*ordered_func)(struct btrfs_work *), 47 btrfs_func_t ordered_func,
46 void (*ordered_free)(struct btrfs_work *)); 48 btrfs_func_t ordered_free);
47void btrfs_queue_work(struct btrfs_workqueue *wq, 49void btrfs_queue_work(struct btrfs_workqueue *wq,
48 struct btrfs_work *work); 50 struct btrfs_work *work);
49void btrfs_destroy_workqueue(struct btrfs_workqueue *wq); 51void btrfs_destroy_workqueue(struct btrfs_workqueue *wq);