Skip to content

Commit

Permalink
fs: dlm: use alloc_ordered_workqueue
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David Teigland <[email protected]>
  • Loading branch information
Alexander Aring authored and teigland committed Jun 2, 2021
1 parent 700ab1c commit 6c6a1cc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6c6a1cc

Please sign in to comment.