Skip to content

Commit f8b799e

Browse files
masalkhigregkh
authored andcommitted
md: remove unused static md_wq workqueue
[ Upstream commit e4979f4 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 3f1e290 commit f8b799e

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
@@ -10345,10 +10344,6 @@ static int __init md_init(void)
1034510344
goto err_bitmap;
1034610345

1034710346
ret = -ENOMEM;
10348-
md_wq = alloc_workqueue("md", WQ_MEM_RECLAIM | WQ_PERCPU, 0);
10349-
if (!md_wq)
10350-
goto err_wq;
10351-
1035210347
md_misc_wq = alloc_workqueue("md_misc", WQ_PERCPU, 0);
1035310348
if (!md_misc_wq)
1035410349
goto err_misc_wq;
@@ -10373,8 +10368,6 @@ static int __init md_init(void)
1037310368
err_md:
1037410369
destroy_workqueue(md_misc_wq);
1037510370
err_misc_wq:
10376-
destroy_workqueue(md_wq);
10377-
err_wq:
1037810371
md_llbitmap_exit();
1037910372
err_bitmap:
1038010373
md_bitmap_exit();
@@ -10683,7 +10676,6 @@ static __exit void md_exit(void)
1068310676
spin_unlock(&all_mddevs_lock);
1068410677

1068510678
destroy_workqueue(md_misc_wq);
10686-
destroy_workqueue(md_wq);
1068710679
md_bitmap_exit();
1068810680
}
1068910681

0 commit comments

Comments
 (0)