提交 6f011058 编写于 作者: D David Sterba

btrfs: use correct type for workqueue flags

Through all the local wrappers to alloc_workqueue, __alloc_workqueue_key
takes an unsigned int.
Signed-off-by: NDavid Sterba <dsterba@suse.cz>
上级 4bbcaa64
...@@ -87,7 +87,7 @@ BTRFS_WORK_HELPER(scrubwrc_helper); ...@@ -87,7 +87,7 @@ BTRFS_WORK_HELPER(scrubwrc_helper);
BTRFS_WORK_HELPER(scrubnc_helper); BTRFS_WORK_HELPER(scrubnc_helper);
static struct __btrfs_workqueue * static struct __btrfs_workqueue *
__btrfs_alloc_workqueue(const char *name, int flags, int max_active, __btrfs_alloc_workqueue(const char *name, unsigned int flags, int max_active,
int thresh) int thresh)
{ {
struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS); struct __btrfs_workqueue *ret = kzalloc(sizeof(*ret), GFP_NOFS);
...@@ -132,7 +132,7 @@ static inline void ...@@ -132,7 +132,7 @@ static inline void
__btrfs_destroy_workqueue(struct __btrfs_workqueue *wq); __btrfs_destroy_workqueue(struct __btrfs_workqueue *wq);
struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name, struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name,
int flags, unsigned int flags,
int max_active, int max_active,
int thresh) int thresh)
{ {
......
...@@ -66,7 +66,7 @@ BTRFS_WORK_HELPER_PROTO(scrubwrc_helper); ...@@ -66,7 +66,7 @@ BTRFS_WORK_HELPER_PROTO(scrubwrc_helper);
BTRFS_WORK_HELPER_PROTO(scrubnc_helper); BTRFS_WORK_HELPER_PROTO(scrubnc_helper);
struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name, struct btrfs_workqueue *btrfs_alloc_workqueue(const char *name,
int flags, unsigned int flags,
int max_active, int max_active,
int thresh); int thresh);
void btrfs_init_work(struct btrfs_work *work, btrfs_work_func_t helper, void btrfs_init_work(struct btrfs_work *work, btrfs_work_func_t helper,
......
...@@ -2227,7 +2227,7 @@ static int btrfs_init_workqueues(struct btrfs_fs_info *fs_info, ...@@ -2227,7 +2227,7 @@ static int btrfs_init_workqueues(struct btrfs_fs_info *fs_info,
struct btrfs_fs_devices *fs_devices) struct btrfs_fs_devices *fs_devices)
{ {
int max_active = fs_info->thread_pool_size; int max_active = fs_info->thread_pool_size;
int flags = WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_UNBOUND; unsigned int flags = WQ_MEM_RECLAIM | WQ_FREEZABLE | WQ_UNBOUND;
fs_info->workers = fs_info->workers =
btrfs_alloc_workqueue("worker", flags | WQ_HIGHPRI, btrfs_alloc_workqueue("worker", flags | WQ_HIGHPRI,
......
...@@ -3561,7 +3561,7 @@ static noinline_for_stack int scrub_workers_get(struct btrfs_fs_info *fs_info, ...@@ -3561,7 +3561,7 @@ static noinline_for_stack int scrub_workers_get(struct btrfs_fs_info *fs_info,
int is_dev_replace) int is_dev_replace)
{ {
int ret = 0; int ret = 0;
int flags = WQ_FREEZABLE | WQ_UNBOUND; unsigned int flags = WQ_FREEZABLE | WQ_UNBOUND;
int max_active = fs_info->thread_pool_size; int max_active = fs_info->thread_pool_size;
if (fs_info->scrub_workers_refcnt == 0) { if (fs_info->scrub_workers_refcnt == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册