* [PATCH] erofs: fix an error code in z_erofs_init_zip_subsystem()
@ 2023-02-16 12:13 Dan Carpenter
2023-02-16 12:14 ` Gao Xiang
2023-02-17 1:41 ` Yue Hu
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-02-16 12:13 UTC (permalink / raw)
To: Sandeep Dhavale; +Cc: kernel-janitors, linux-erofs, Yue Hu
Return -ENOMEM if alloc_workqueue() fails. Don't return success.
Fixes: d8a650adf429 ("erofs: add per-cpu threads for decompression as an option")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
fs/erofs/zdata.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 8ea3f5fe985e..3247d2422bea 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -475,8 +475,10 @@ int __init z_erofs_init_zip_subsystem(void)
z_erofs_workqueue = alloc_workqueue("erofs_worker",
WQ_UNBOUND | WQ_HIGHPRI, num_possible_cpus());
- if (!z_erofs_workqueue)
+ if (!z_erofs_workqueue) {
+ err = -ENOMEM;
goto out_error_workqueue_init;
+ }
err = erofs_init_percpu_workers();
if (err)
--
2.39.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] erofs: fix an error code in z_erofs_init_zip_subsystem()
2023-02-16 12:13 [PATCH] erofs: fix an error code in z_erofs_init_zip_subsystem() Dan Carpenter
@ 2023-02-16 12:14 ` Gao Xiang
2023-02-17 1:41 ` Yue Hu
1 sibling, 0 replies; 3+ messages in thread
From: Gao Xiang @ 2023-02-16 12:14 UTC (permalink / raw)
To: Dan Carpenter, Sandeep Dhavale; +Cc: linux-erofs, Yue Hu, kernel-janitors
On 2023/2/16 20:13, Dan Carpenter wrote:
> Return -ENOMEM if alloc_workqueue() fails. Don't return success.
>
> Fixes: d8a650adf429 ("erofs: add per-cpu threads for decompression as an option")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Thanks,
Gao Xiang
> ---
> fs/erofs/zdata.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
> index 8ea3f5fe985e..3247d2422bea 100644
> --- a/fs/erofs/zdata.c
> +++ b/fs/erofs/zdata.c
> @@ -475,8 +475,10 @@ int __init z_erofs_init_zip_subsystem(void)
>
> z_erofs_workqueue = alloc_workqueue("erofs_worker",
> WQ_UNBOUND | WQ_HIGHPRI, num_possible_cpus());
> - if (!z_erofs_workqueue)
> + if (!z_erofs_workqueue) {
> + err = -ENOMEM;
> goto out_error_workqueue_init;
> + }
>
> err = erofs_init_percpu_workers();
> if (err)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] erofs: fix an error code in z_erofs_init_zip_subsystem()
2023-02-16 12:13 [PATCH] erofs: fix an error code in z_erofs_init_zip_subsystem() Dan Carpenter
2023-02-16 12:14 ` Gao Xiang
@ 2023-02-17 1:41 ` Yue Hu
1 sibling, 0 replies; 3+ messages in thread
From: Yue Hu @ 2023-02-17 1:41 UTC (permalink / raw)
To: Dan Carpenter
Cc: linux-erofs, zhangwen, huyue2, kernel-janitors, Sandeep Dhavale
On Thu, 16 Feb 2023 15:13:04 +0300
Dan Carpenter <error27@gmail.com> wrote:
> Return -ENOMEM if alloc_workqueue() fails. Don't return success.
>
> Fixes: d8a650adf429 ("erofs: add per-cpu threads for decompression as an option")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Yue Hu <huyue2@coolpad.com>
> ---
> fs/erofs/zdata.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
> index 8ea3f5fe985e..3247d2422bea 100644
> --- a/fs/erofs/zdata.c
> +++ b/fs/erofs/zdata.c
> @@ -475,8 +475,10 @@ int __init z_erofs_init_zip_subsystem(void)
>
> z_erofs_workqueue = alloc_workqueue("erofs_worker",
> WQ_UNBOUND | WQ_HIGHPRI, num_possible_cpus());
> - if (!z_erofs_workqueue)
> + if (!z_erofs_workqueue) {
> + err = -ENOMEM;
> goto out_error_workqueue_init;
> + }
>
> err = erofs_init_percpu_workers();
> if (err)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-17 1:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-16 12:13 [PATCH] erofs: fix an error code in z_erofs_init_zip_subsystem() Dan Carpenter
2023-02-16 12:14 ` Gao Xiang
2023-02-17 1:41 ` Yue Hu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox