Commit 438c8374 authored by Philipp Reisner's avatar Philipp Reisner

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

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 778bcf2e
...@@ -1319,6 +1319,8 @@ static int _drbd_may_sync_now(struct drbd_conf *mdev) ...@@ -1319,6 +1319,8 @@ static int _drbd_may_sync_now(struct drbd_conf *mdev)
struct drbd_conf *odev = mdev; struct drbd_conf *odev = mdev;
while (1) { while (1) {
if (!odev->ldev)
return 1;
if (odev->ldev->dc.resync_after == -1) if (odev->ldev->dc.resync_after == -1)
return 1; return 1;
odev = minor_to_mdev(odev->ldev->dc.resync_after); odev = minor_to_mdev(odev->ldev->dc.resync_after);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment