mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 06:37:59 +00:00
btrfs: scrub: simplify scrub worker initialization
Minor simplification, merge calls to one. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
1d1bf92d9d
commit
af1cbe0a66
1 changed files with 2 additions and 8 deletions
|
@ -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;
|
int max_active = fs_info->thread_pool_size;
|
||||||
|
|
||||||
if (fs_info->scrub_workers_refcnt == 0) {
|
if (fs_info->scrub_workers_refcnt == 0) {
|
||||||
if (is_dev_replace)
|
fs_info->scrub_workers = btrfs_alloc_workqueue(fs_info, "scrub",
|
||||||
fs_info->scrub_workers =
|
flags, is_dev_replace ? 1 : max_active, 4);
|
||||||
btrfs_alloc_workqueue(fs_info, "scrub", flags,
|
|
||||||
1, 4);
|
|
||||||
else
|
|
||||||
fs_info->scrub_workers =
|
|
||||||
btrfs_alloc_workqueue(fs_info, "scrub", flags,
|
|
||||||
max_active, 4);
|
|
||||||
if (!fs_info->scrub_workers)
|
if (!fs_info->scrub_workers)
|
||||||
goto fail_scrub_workers;
|
goto fail_scrub_workers;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue