Skip to content

Commit

Permalink
drbd: Do not segfault if a sync dependency reaches a diskless device
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent 778bcf2 commit 438c837
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/block/drbd/drbd_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 438c837

Please sign in to comment.