diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-28 14:48:01 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:44:58 +0100 |
commit | 438c8374ae3e87f44d945a2ac2901e3b14aec1a8 (patch) | |
tree | b71e4602b575ae5b6291caa57e4894cd617d11cb /drivers/block/drbd/drbd_worker.c | |
parent | 778bcf2e290fc9f13735c32640cdafb34794ebd1 (diff) |
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>
Diffstat (limited to 'drivers/block/drbd/drbd_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index cbbc5c7cbef..c3d1f5f5853 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -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); |