Linux 4.4.30
[firefly-linux-kernel-4.4.55.git] / fs / dlm / lowcomms.c
index 3a37bd3f9637811c3b86e5c05be5aa47f32819c3..9d7a4a71490738029fbc33e6d6a1ca1b00fe97f0 100644 (file)
@@ -1607,16 +1607,12 @@ void dlm_lowcomms_stop(void)
        mutex_lock(&connections_lock);
        dlm_allow_conn = 0;
        foreach_conn(stop_conn);
+       clean_writequeues();
+       foreach_conn(free_conn);
        mutex_unlock(&connections_lock);
 
        work_stop();
 
-       mutex_lock(&connections_lock);
-       clean_writequeues();
-
-       foreach_conn(free_conn);
-
-       mutex_unlock(&connections_lock);
        kmem_cache_destroy(con_cache);
 }