gfs2.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH dlm/next] dlm: add missing -ENOMEM if alloc_workqueue() fails
@ 2024-08-12 20:14 Alexander Aring
  0 siblings, 0 replies; only message in thread
From: Alexander Aring @ 2024-08-12 20:14 UTC (permalink / raw)
  To: teigland; +Cc: gfs2, aahringo, dan.carpenter

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")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202408110800.OsoP8TB9-lkp@intel.com/
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
 fs/dlm/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/dlm/main.c b/fs/dlm/main.c
index cb15db8ba9bf..4887c8a05318 100644
--- a/fs/dlm/main.c
+++ b/fs/dlm/main.c
@@ -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");
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-12 20:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12 20:14 [PATCH dlm/next] dlm: add missing -ENOMEM if alloc_workqueue() fails Alexander Aring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).