Whamcloud - gitweb
LU-12616 obclass: fix MDS start/stop race
[fs/lustre-release.git] / lustre / osp / osp_dev.c
index f45cd74..dc3249b 100644 (file)
@@ -1339,7 +1339,6 @@ static struct lu_device *osp_device_fini(const struct lu_env *env,
        }
 
        LASSERT(osp->opd_obd);
-       osp_tunables_fini(osp);
 
        rc = client_obd_cleanup(osp->opd_obd);
        if (rc != 0) {
@@ -1347,6 +1346,8 @@ static struct lu_device *osp_device_fini(const struct lu_env *env,
                RETURN(ERR_PTR(rc));
        }
 
+       osp_tunables_fini(osp);
+
        ptlrpcd_decref();
 
        RETURN(NULL);