diff options
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index c674f17773a6..859afdfe5a08 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -1792,7 +1792,10 @@ void wait_for_work(struct drbd_tconn *connection, struct list_head *work_list) | |||
1792 | prepare_to_wait(&connection->sender_work.q_wait, &wait, TASK_INTERRUPTIBLE); | 1792 | prepare_to_wait(&connection->sender_work.q_wait, &wait, TASK_INTERRUPTIBLE); |
1793 | spin_lock_irq(&connection->req_lock); | 1793 | spin_lock_irq(&connection->req_lock); |
1794 | spin_lock(&connection->sender_work.q_lock); /* FIXME get rid of this one? */ | 1794 | spin_lock(&connection->sender_work.q_lock); /* FIXME get rid of this one? */ |
1795 | list_splice_init(&connection->sender_work.q, work_list); | 1795 | /* dequeue single item only, |
1796 | * we still use drbd_queue_work_front() in some places */ | ||
1797 | if (!list_empty(&connection->sender_work.q)) | ||
1798 | list_move(connection->sender_work.q.next, work_list); | ||
1796 | spin_unlock(&connection->sender_work.q_lock); /* FIXME get rid of this one? */ | 1799 | spin_unlock(&connection->sender_work.q_lock); /* FIXME get rid of this one? */ |
1797 | if (!list_empty(work_list) || signal_pending(current)) { | 1800 | if (!list_empty(work_list) || signal_pending(current)) { |
1798 | spin_unlock_irq(&connection->req_lock); | 1801 | spin_unlock_irq(&connection->req_lock); |