summaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index b4e1dab62dc1..d9f3f7fd9bb2 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1815,6 +1815,7 @@ static int receive_Data(struct drbd_conf *mdev, enum drbd_packet cmd,
first = 1;
for (;;) {
struct drbd_interval *i;
+ struct drbd_request *req2;
int have_unacked = 0;
int have_conflict = 0;
prepare_to_wait(&mdev->misc_wait, &wait,
@@ -1822,8 +1823,7 @@ static int receive_Data(struct drbd_conf *mdev, enum drbd_packet cmd,
i = drbd_find_overlap(&mdev->write_requests, sector, size);
if (i) {
- struct drbd_request *req2 =
- container_of(i, struct drbd_request, i);
+ req2 = container_of(i, struct drbd_request, i);
/* only ALERT on first iteration,
* we may be woken up early... */
@@ -1869,6 +1869,9 @@ static int receive_Data(struct drbd_conf *mdev, enum drbd_packet cmd,
goto out_interrupted;
}
+ /* Indicate to wake up mdev->misc_wait upon completion. */
+ req2->rq_state |= RQ_COLLISION;
+
spin_unlock_irq(&mdev->tconn->req_lock);
if (first) {
first = 0;