fs: dlm: use alloc_ordered_workqueue
authorAlexander Aring <aahringo@redhat.com>
Wed, 2 Jun 2021 13:45:17 +0000 (09:45 -0400)
committerDavid Teigland <teigland@redhat.com>
Wed, 2 Jun 2021 16:53:04 +0000 (11:53 -0500)
The proper way to allocate ordered workqueues is to use
alloc_ordered_workqueue() function. The current way implies an ordered
workqueue which is also required by dlm.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lowcomms.c

index b71f7ea..02b636d 100644 (file)
@@ -1816,15 +1816,13 @@ static void work_stop(void)
 
 static int work_start(void)
 {
-       recv_workqueue = alloc_workqueue("dlm_recv",
-                                        WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
+       recv_workqueue = alloc_ordered_workqueue("dlm_recv", WQ_MEM_RECLAIM);
        if (!recv_workqueue) {
                log_print("can't start dlm_recv");
                return -ENOMEM;
        }
 
-       send_workqueue = alloc_workqueue("dlm_send",
-                                        WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
+       send_workqueue = alloc_ordered_workqueue("dlm_send", WQ_MEM_RECLAIM);
        if (!send_workqueue) {
                log_print("can't start dlm_send");
                destroy_workqueue(recv_workqueue);