mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 19:01:37 +00:00
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:
parent
778bcf2e29
commit
438c8374ae
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user