aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_receiver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 93106fb92be8..c7285e16b667 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1331,6 +1331,9 @@ static int drbd_drain_block(struct drbd_conf *mdev, int data_size)
1331 int rr, rv = 1; 1331 int rr, rv = 1;
1332 void *data; 1332 void *data;
1333 1333
1334 if (!data_size)
1335 return TRUE;
1336
1334 page = drbd_pp_alloc(mdev, 1); 1337 page = drbd_pp_alloc(mdev, 1);
1335 1338
1336 data = kmap(page); 1339 data = kmap(page);
@@ -1946,7 +1949,7 @@ static int receive_DataRequest(struct drbd_conf *mdev, struct p_header *h)
1946 "no local data.\n"); 1949 "no local data.\n");
1947 drbd_send_ack_rp(mdev, h->command == P_DATA_REQUEST ? P_NEG_DREPLY : 1950 drbd_send_ack_rp(mdev, h->command == P_DATA_REQUEST ? P_NEG_DREPLY :
1948 P_NEG_RS_DREPLY , p); 1951 P_NEG_RS_DREPLY , p);
1949 return TRUE; 1952 return drbd_drain_block(mdev, h->length - brps);
1950 } 1953 }
1951 1954
1952 /* GFP_NOIO, because we must not cause arbitrary write-out: in a DRBD 1955 /* GFP_NOIO, because we must not cause arbitrary write-out: in a DRBD