Whamcloud - gitweb
LU-18024 quota: fix the order of freeing qmt_lvbo_free_wq 78/56778/2
authorHongchao Zhang <hongchao@whamcloud.com>
Sun, 3 Mar 2024 02:11:36 +0000 (10:11 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 26 Oct 2024 23:55:52 +0000 (23:55 +0000)
In qmt_device_fini, put the freeing of the qmt_lvbo_free_wq after
all possible usage of it having finished cleanup.

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ia26f1bc490adff5ae7dc850e2c89baf5874f01c5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56778
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/quota/qmt_dev.c
lustre/quota/qmt_internal.h

index 77ba633..dc3ae6e 100644 (file)
@@ -77,11 +77,6 @@ static struct lu_device *qmt_device_fini(const struct lu_env *env,
        CDEBUG(D_QUOTA, "%s: initiating QMT shutdown\n", qmt->qmt_svname);
        qmt->qmt_stopping = true;
 
-       if (qmt->qmt_lvbo_free_wq) {
-               destroy_workqueue(qmt->qmt_lvbo_free_wq);
-               qmt->qmt_lvbo_free_wq = NULL;
-       }
-
        /* kill pool instances, if any */
        qmt_pool_fini(env, qmt);
 
@@ -111,6 +106,11 @@ static struct lu_device *qmt_device_fini(const struct lu_env *env,
        ld->ld_obd->obd_namespace = NULL;
        qmt->qmt_ns = NULL;
 
+       if (qmt->qmt_lvbo_free_wq) {
+               destroy_workqueue(qmt->qmt_lvbo_free_wq);
+               qmt->qmt_lvbo_free_wq = NULL;
+       }
+
        RETURN(NULL);
 }
 
index a793a2c..022ab40 100644 (file)
@@ -10,8 +10,6 @@
 
 #include "lquota_internal.h"
 
-extern struct workqueue_struct *qmt_lvbo_free_wq;
-
 /*
  * The Quota Master Target Device.
  * The qmt is responsible for: