Skip to content

Commit aa7ab1e

Browse files
alexaringteigland
authored andcommitted
fs: dlm: synchronize dlm before shutdown
This patch moves the dlm workqueue dlm synchronization before shutdown handling. The patch just flushes all pending work before starting to shutdown the connection. At least for the send_workqeue we should flush the workqueue to make sure there is no new connection handling going on as dlm_allow_conn switch is turned to false before. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
1 parent d012a71 commit aa7ab1e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎fs/dlm/lowcomms.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,10 +1624,6 @@ static void work_flush(void)
16241624
struct hlist_node *n;
16251625
struct connection *con;
16261626

1627-
if (recv_workqueue)
1628-
flush_workqueue(recv_workqueue);
1629-
if (send_workqueue)
1630-
flush_workqueue(send_workqueue);
16311627
do {
16321628
ok = 1;
16331629
foreach_conn(stop_conn);
@@ -1659,6 +1655,12 @@ void dlm_lowcomms_stop(void)
16591655
mutex_lock(&connections_lock);
16601656
dlm_allow_conn = 0;
16611657
mutex_unlock(&connections_lock);
1658+
1659+
if (recv_workqueue)
1660+
flush_workqueue(recv_workqueue);
1661+
if (send_workqueue)
1662+
flush_workqueue(send_workqueue);
1663+
16621664
foreach_conn(shutdown_conn);
16631665
work_flush();
16641666
clean_writequeues();

0 commit comments

Comments
 (0)