Commit 990f61e4 authored by Yangtao Li's avatar Yangtao Li Committed by Mike Snitzer

dm mirror: add DMERR message if alloc_workqueue fails

Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent b362c733
...@@ -1501,8 +1501,10 @@ static int __init dm_mirror_init(void) ...@@ -1501,8 +1501,10 @@ static int __init dm_mirror_init(void)
int r; int r;
dm_raid1_wq = alloc_workqueue("dm_raid1_wq", 0, 0); dm_raid1_wq = alloc_workqueue("dm_raid1_wq", 0, 0);
if (!dm_raid1_wq) if (!dm_raid1_wq) {
DMERR("Failed to alloc workqueue");
return -ENOMEM; return -ENOMEM;
}
r = dm_register_target(&mirror_target); r = dm_register_target(&mirror_target);
if (r < 0) { if (r < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment