drbd: Do not segfault if a sync dependency reaches a diskless device

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
Philipp Reisner 2011-03-28 14:48:01 +02:00
parent 778bcf2e29
commit 438c8374ae

View file

@ -1319,6 +1319,8 @@ static int _drbd_may_sync_now(struct drbd_conf *mdev)
struct drbd_conf *odev = mdev;
while (1) {
if (!odev->ldev)
return 1;
if (odev->ldev->dc.resync_after == -1)
return 1;
odev = minor_to_mdev(odev->ldev->dc.resync_after);