diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index b1957d6c8bf5..cf3c10e23c50 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c @@ -628,7 +628,8 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what, /* assert something? */ if (req->rq_state & RQ_NET_PENDING) { dec_ap_pending(mdev); - atomic_sub(req->i.size >> 9, &mdev->ap_in_flight); + if (req->rq_state & RQ_WRITE) + atomic_sub(req->i.size >> 9, &mdev->ap_in_flight); } req->rq_state &= ~(RQ_NET_OK|RQ_NET_PENDING);