mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 23:11:27 +00:00
btrfs: Cleanup the btrfs_workqueue related function type
The new btrfs_workqueue still use open-coded function defition, this patch will change them into btrfs_func_t type which is much the same as kernel workqueue. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fb.com>
This commit is contained in:
parent
2131bcd38b
commit
6db8914f97
2 changed files with 14 additions and 12 deletions
|
@ -255,9 +255,9 @@ static void normal_work_helper(struct work_struct *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
void btrfs_init_work(struct btrfs_work *work,
|
void btrfs_init_work(struct btrfs_work *work,
|
||||||
void (*func)(struct btrfs_work *),
|
btrfs_func_t func,
|
||||||
void (*ordered_func)(struct btrfs_work *),
|
btrfs_func_t ordered_func,
|
||||||
void (*ordered_free)(struct btrfs_work *))
|
btrfs_func_t ordered_free)
|
||||||
{
|
{
|
||||||
work->func = func;
|
work->func = func;
|
||||||
work->ordered_func = ordered_func;
|
work->ordered_func = ordered_func;
|
||||||
|
|
|
@ -23,11 +23,13 @@
|
||||||
struct btrfs_workqueue;
|
struct btrfs_workqueue;
|
||||||
/* Internal use only */
|
/* Internal use only */
|
||||||
struct __btrfs_workqueue;
|
struct __btrfs_workqueue;
|
||||||
|
struct btrfs_work;
|
||||||
|
typedef void (*btrfs_func_t)(struct btrfs_work *arg);
|
||||||
|
|
||||||
struct btrfs_work {
|
struct btrfs_work {
|
||||||
void (*func)(struct btrfs_work *arg);
|
btrfs_func_t func;
|
||||||
void (*ordered_func)(struct btrfs_work *arg);
|
btrfs_func_t ordered_func;
|
||||||
void (*ordered_free)(struct btrfs_work *arg);
|
btrfs_func_t ordered_free;
|
||||||
|
|
||||||
/* Don't touch things below */
|
/* Don't touch things below */
|
||||||
struct work_struct normal_work;
|
struct work_struct normal_work;
|
||||||
|
@ -37,13 +39,13 @@ struct btrfs_work {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct btrfs_workqueue *btrfs_alloc_workqueue(char *name,
|
struct btrfs_workqueue *btrfs_alloc_workqueue(char *name,
|
||||||
int flags,
|
int flags,
|
||||||
int max_active,
|
int max_active,
|
||||||
int thresh);
|
int thresh);
|
||||||
void btrfs_init_work(struct btrfs_work *work,
|
void btrfs_init_work(struct btrfs_work *work,
|
||||||
void (*func)(struct btrfs_work *),
|
btrfs_func_t func,
|
||||||
void (*ordered_func)(struct btrfs_work *),
|
btrfs_func_t ordered_func,
|
||||||
void (*ordered_free)(struct btrfs_work *));
|
btrfs_func_t ordered_free);
|
||||||
void btrfs_queue_work(struct btrfs_workqueue *wq,
|
void btrfs_queue_work(struct btrfs_workqueue *wq,
|
||||||
struct btrfs_work *work);
|
struct btrfs_work *work);
|
||||||
void btrfs_destroy_workqueue(struct btrfs_workqueue *wq);
|
void btrfs_destroy_workqueue(struct btrfs_workqueue *wq);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue