fs/afs/callback: Remove deprecated create_singlethread_workqueue
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Sun, 4 Sep 2016 15:24:11 +0000 (20:54 +0530)
committerDavid Howells <dhowells@redhat.com>
Sun, 4 Sep 2016 20:41:39 +0000 (21:41 +0100)
The workqueue "afs_callback_update_worker" queues multiple work items
viz  &vnode->cb_broken_work, &server->cb_break_work which require strict
execution ordering. Hence, an ordered dedicated workqueue has been used.

Since the workqueue is being used on a memory reclaim path, WQ_MEM_RECLAIM
has been set to ensure forward progress under memory pressure.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/callback.c

index 7ef637d7f3a56f22f1b9c4197cd6c94a483ef85b..1e9d2f84e5b53cf3a97f7863e3260adc4f8312eb 100644 (file)
@@ -461,8 +461,8 @@ static void afs_callback_updater(struct work_struct *work)
  */
 int __init afs_callback_update_init(void)
 {
-       afs_callback_update_worker =
-               create_singlethread_workqueue("kafs_callbackd");
+       afs_callback_update_worker = alloc_ordered_workqueue("kafs_callbackd",
+                                                            WQ_MEM_RECLAIM);
        return afs_callback_update_worker ? 0 : -ENOMEM;
 }