Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a821cc4a authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Philipp Reisner
Browse files

drbd: fix spurious protocol error



If we cannot satisfy a request (because our disk just broke),
we still need to drain the payload.  Or we'll get a protocol error
when interpreting the payload as DRBD packet header.

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 1d53f09e
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2085,7 +2085,8 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packets cmd, un
			    "no local data.\n");
			    "no local data.\n");
		drbd_send_ack_rp(mdev, cmd == P_DATA_REQUEST ? P_NEG_DREPLY :
		drbd_send_ack_rp(mdev, cmd == P_DATA_REQUEST ? P_NEG_DREPLY :
				 P_NEG_RS_DREPLY , p);
				 P_NEG_RS_DREPLY , p);
		return TRUE;
		/* drain possibly payload */
		return drbd_drain_block(mdev, digest_size);
	}
	}


	/* GFP_NOIO, because we must not cause arbitrary write-out: in a DRBD
	/* GFP_NOIO, because we must not cause arbitrary write-out: in a DRBD