btrfs: simplify workqueue name when allocating
David Sterba
maintainerPATCH 1/1 btrfs: simplify workqueue name when allocating
The workqueue name is constructed from a format string but the prefix does not need to be set by %s.
Signed-off-by David Sterba <[email protected]>
--- fs/btrfs/async-thread.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
fs/btrfs/async-thread.c +4 -6
@@ -127,13 +127,11 @@ __btrfs_alloc_workqueue(struct btrfs_fs_info *fs_info, const char *name, }if (flags &WQ_HIGHPRI ) - ret->normal_wq =alloc_workqueue ("%s-%s-high" , flags, - ret->current_active,"btrfs" , - name); + ret->normal_wq =alloc_workqueue ("btrfs-%s-high" , flags, + ret->current_active, name);else - ret->normal_wq =alloc_workqueue ("%s-%s" , flags, - ret->current_active,"btrfs" , - name); + ret->normal_wq =alloc_workqueue ("btrfs-%s" , flags, + ret->current_active, name);if (!ret->normal_wq) {kfree (ret);return NULL ;
Signature · 1 line
2.20.1
Quoted 4 lines · David Sterba
The workqueue name is constructed from a format string but the prefix does not need to be set by %s.
Signed-off-by David Sterba <[email protected]>
Reviewed-by Nikolay Borisov <[email protected]>
Quoted 27 lines
--- fs/btrfs/async-thread.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)fs/btrfs/async-thread.c +4
-6@@ -127,13 +127,11 @@ __btrfs_alloc_workqueue(struct btrfs_fs_info *fs_info, const char *name, }if (flags &WQ_HIGHPRI ) - ret->normal_wq =alloc_workqueue ("%s-%s-high" , flags, - ret->current_active,"btrfs" , - name); + ret->normal_wq =alloc_workqueue ("btrfs-%s-high" , flags, + ret->current_active, name);else - ret->normal_wq =alloc_workqueue ("%s-%s" , flags, - ret->current_active,"btrfs" , - name); + ret->normal_wq =alloc_workqueue ("btrfs-%s" , flags, + ret->current_active, name);if (!ret->normal_wq) {kfree (ret);return NULL ;