summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-03-31 18:42:57 +0200
committerDavid Sterba <dsterba@suse.com>2017-08-21 17:47:42 +0200
commitaf1cbe0a66cb9e6c3f2acf7f0a7fc647b5dc4f2f (patch)
tree6a59dffa659f66046e3f48433505cf148df7fbfd /fs/btrfs
parent1d1bf92d9dee0aeb14dee38151bcf214443f99d5 (diff)
btrfs: scrub: simplify scrub worker initialization
Minor simplification, merge calls to one. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/scrub.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index a1b29d581dca..7c9c82bb6255 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -4015,14 +4015,8 @@ static noinline_for_stack int scrub_workers_get(struct btrfs_fs_info *fs_info,
int max_active = fs_info->thread_pool_size;
if (fs_info->scrub_workers_refcnt == 0) {
- if (is_dev_replace)
- fs_info->scrub_workers =
- btrfs_alloc_workqueue(fs_info, "scrub", flags,
- 1, 4);
- else
- fs_info->scrub_workers =
- btrfs_alloc_workqueue(fs_info, "scrub", flags,
- max_active, 4);
+ fs_info->scrub_workers = btrfs_alloc_workqueue(fs_info, "scrub",
+ flags, is_dev_replace ? 1 : max_active, 4);
if (!fs_info->scrub_workers)
goto fail_scrub_workers;