Skip to contentSkip to conversation

dlm: add missing -ENOMEM if alloc_workqueue() fails

PATCH New Alexander Aring 1 participant 1 message Aug 12, 2024 Distributed lock manager (DLM)

lore
Share & tools
lore

Alexander Aring

author maintainer
#0 lore raw

PATCH 1/1 dlm: add missing -ENOMEM if alloc_workqueue() fails

This patch sets an missing -ENOMEM as error return value when the allocation of the dlm workqueue fails.

Fixes 94e180d6255f ("dlm: async freeing of lockspace resources")
---
 fs/dlm/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/dlm/main.c +3 -1
index cb15db8ba9bf..4887c8a05318 100644
@@ -53,8 +53,10 @@ static int __init init_dlm(void)
 		goto out_user;
 
 	dlm_wq = alloc_workqueue("dlm_wq", 0, 0);
-	if (!dlm_wq)
+	if (!dlm_wq) {
+		error = -ENOMEM;
 		goto out_plock;
+	}
 
 	printk("DLM installed\n");
 
Signature · 1 line
2.43.0