drbd: fix null pointer dereference with on-congestion policy when diskless
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 30 Jul 2012 07:06:26 +0000 (09:06 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:58:38 +0000 (16:58 +0100)
commit3b9ef85e05f123f535d4ee1c5041b80f80648e50
tree48ef1eeef5aa653171f68d7c4f0e57e138d3d74a
parent27012382bc221a8cf6ca67ced19df699b0ba8e78
drbd: fix null pointer dereference with on-congestion policy when diskless

We must not look at mdev->actlog, unless we have a get_ldev() reference.
It also does not make much sense to try to disconnect or pull-ahead of
the peer, if we don't have good local data.

Only even consider congestion policies, if our local disk is D_UP_TO_DATE.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_req.c