nvmet: free workqueue object if module init fails
Subsystems (2)
PATCH v2 1/1 nvmet: free workqueue object if module init fails
Signed-off-by Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
Changes since V1:-
1. Add a separate goto for freeing workqueue.
--- drivers/nvme/target/core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/nvme/target/core.c +5 -3
@@ -1210,7 +1210,7 @@ static int __init nvmet_init(void) error =nvmet_init_discovery ();if (error) - goto out; + goto out_free_work_queue; error =nvmet_init_configfs ();if (error)
@@ -1219,9 +1219,11 @@ static int __init nvmet_init(void) out_exit_discovery:nvmet_exit_discovery (); + +out_free_work_queue: +destroy_workqueue (buffered_io_wq); + out: -if (buffered_io_wq) -destroy_workqueue (buffered_io_wq);return error; }
Signature · 1 line
2.17.0
PATCH v2 1/1 nvmet: free workqueue object if module init fails
Looks good, but I had to apply this manually as the context didn't match what is upstream. Please double check that I didn't mess it up.
PATCH v2 1/1 nvmet: free workqueue object if module init fails
Thanks Christoph, everything looks good.
On 8/22/18, 6:05 AM, "Christoph Hellwig" <[email protected]> wrote:
Looks good, but I had to apply this manually as the context didn't match what is upstream. Please double check that I didn't mess it up.