Skip to content

Commit e4979f4

Browse files
masalkhihailan94
authored andcommitted
md: remove unused static md_wq workqueue
The md_wq workqueue is defined as static and initialized in md_init(), but it is not used anywhere within md.c. All asynchronous and deferred work in this file is handled via md_misc_wq or dedicated md threads. Fixes: b75197e ("md: Remove flush handling") Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com> Link: https://lore.kernel.org/linux-raid/20260328193522.3624-1-abd.masalkhi@gmail.com/ Signed-off-by: Yu Kuai <yukuai@fnnas.com>
1 parent 078d1d8 commit e4979f4

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

drivers/md/md.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ static DEFINE_XARRAY(md_submodule);
8484
static const struct kobj_type md_ktype;
8585

8686
static DECLARE_WAIT_QUEUE_HEAD(resync_wait);
87-
static struct workqueue_struct *md_wq;
8887

8988
/*
9089
* This workqueue is used for sync_work to register new sync_thread, and for
@@ -10511,10 +10510,6 @@ static int __init md_init(void)
1051110510
goto err_bitmap;
1051210511

1051310512
ret = -ENOMEM;
10514-
md_wq = alloc_workqueue("md", WQ_MEM_RECLAIM | WQ_PERCPU, 0);
10515-
if (!md_wq)
10516-
goto err_wq;
10517-
1051810513
md_misc_wq = alloc_workqueue("md_misc", WQ_PERCPU, 0);
1051910514
if (!md_misc_wq)
1052010515
goto err_misc_wq;
@@ -10539,8 +10534,6 @@ static int __init md_init(void)
1053910534
err_md:
1054010535
destroy_workqueue(md_misc_wq);
1054110536
err_misc_wq:
10542-
destroy_workqueue(md_wq);
10543-
err_wq:
1054410537
md_llbitmap_exit();
1054510538
err_bitmap:
1054610539
md_bitmap_exit();
@@ -10849,7 +10842,6 @@ static __exit void md_exit(void)
1084910842
spin_unlock(&all_mddevs_lock);
1085010843

1085110844
destroy_workqueue(md_misc_wq);
10852-
destroy_workqueue(md_wq);
1085310845
md_bitmap_exit();
1085410846
}
1085510847

0 commit comments

Comments
 (0)