fs/ocfs2/dlm: remove deprecated create_singlethread_workqueue()
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Fri, 7 Oct 2016 23:57:17 +0000 (16:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 8 Oct 2016 01:46:26 +0000 (18:46 -0700)
The workqueue "dlm_worker" queues a single work item &dlm->dispatched_work
and thus it doesn't require execution ordering.  Hence, alloc_workqueue
has been used to replace the deprecated create_singlethread_workqueue
instance.

The WQ_MEM_RECLAIM flag has been set to ensure forward progress under
memory pressure.

Since there are fixed number of work items, explicit concurrency
limit is unnecessary here.

Link: http://lkml.kernel.org/r/2b5ad8d6688effe1a9ddb2bc2082d26fbbe00302.1472590094.git.bhaktipriya96@gmail.com
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Joseph Qi <joseph.qi@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/dlm/dlmdomain.c

index 533bd524e41eb087ba6775a0f76bab9f95948754..733e4e79c8e25f02e3a3af1ad562049d32742cbc 100644 (file)
@@ -1904,7 +1904,7 @@ static int dlm_join_domain(struct dlm_ctxt *dlm)
        }
 
        snprintf(wq_name, O2NM_MAX_NAME_LEN, "dlm_wq-%s", dlm->name);
-       dlm->dlm_worker = create_singlethread_workqueue(wq_name);
+       dlm->dlm_worker = alloc_workqueue(wq_name, WQ_MEM_RECLAIM, 0);
        if (!dlm->dlm_worker) {
                status = -ENOMEM;
                mlog_errno(status);