summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_worker.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@kernel.org>2011-08-26 23:50:08 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-02-17 16:50:44 +0100
commit6db7e50a8a40d2210544b4a09f3d4988127c20ad (patch)
tree1789154c2e5115245395dd3331e1d226ee5e7f66 /drivers/block/drbd/drbd_worker.c
parentd448a2e1e3d02f8f19111191d490b7e0a5eb70ea (diff)
downloadlinux-stable-6db7e50a8a40d2210544b4a09f3d4988127c20ad.tar.gz
linux-stable-6db7e50a8a40d2210544b4a09f3d4988127c20ad.tar.bz2
linux-stable-6db7e50a8a40d2210544b4a09f3d4988127c20ad.zip
drbd: In the worker thread, process drbd_work instead of drbd_device_work items
Signed-off-by: Andreas Gruenbacher <agruen@linbit.com> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_worker.c')
-rw-r--r--drivers/block/drbd/drbd_worker.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index c0ee7032f607..be9c4b894988 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -1888,7 +1888,7 @@ static void wait_for_work(struct drbd_connection *connection, struct list_head *
int drbd_worker(struct drbd_thread *thi)
{
struct drbd_connection *connection = thi->connection;
- struct drbd_device_work *dw = NULL;
+ struct drbd_work *w = NULL;
struct drbd_peer_device *peer_device;
LIST_HEAD(work_list);
int vnr;
@@ -1914,9 +1914,9 @@ int drbd_worker(struct drbd_thread *thi)
break;
while (!list_empty(&work_list)) {
- dw = list_first_entry(&work_list, struct drbd_device_work, w.list);
- list_del_init(&dw->w.list);
- if (dw->w.cb(&dw->w, connection->cstate < C_WF_REPORT_PARAMS) == 0)
+ w = list_first_entry(&work_list, struct drbd_work, list);
+ list_del_init(&w->list);
+ if (w->cb(w, connection->cstate < C_WF_REPORT_PARAMS) == 0)
continue;
if (connection->cstate >= C_WF_REPORT_PARAMS)
conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD);
@@ -1925,9 +1925,9 @@ int drbd_worker(struct drbd_thread *thi)
do {
while (!list_empty(&work_list)) {
- dw = list_first_entry(&work_list, struct drbd_device_work, w.list);
- list_del_init(&dw->w.list);
- dw->w.cb(&dw->w, 1);
+ w = list_first_entry(&work_list, struct drbd_work, list);
+ list_del_init(&w->list);
+ w->cb(w, 1);
}
dequeue_work_batch(&connection->sender_work, &work_list);
} while (!list_empty(&work_list));