From 31a31dccdd308d5ec7f9a1197a7875a246a348dc Mon Sep 17 00:00:00 2001 From: Philipp Reisner Date: Wed, 19 May 2010 16:28:28 +0200 Subject: drbd: Do not Oops when C_STANDALONE when uuid gets generated Got introduces with commit 0c3f34516e8c5a1a0ba3585a7777d32bbbdf4ecb Author: Philipp Reisner Date: Mon May 17 16:10:43 2010 +0200 drbd: Create new current UUID as late as possible Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe --- drivers/block/drbd/drbd_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/block') diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index c144509..7e057b0 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -1354,7 +1354,10 @@ static int w_new_current_uuid(struct drbd_conf *mdev, struct drbd_work *w, int c { if (get_ldev(mdev)) { drbd_uuid_new_current(mdev); - drbd_send_uuids(mdev); + if (get_net_conf(mdev)) { + drbd_send_uuids(mdev); + put_net_conf(mdev); + } drbd_md_sync(mdev); put_ldev(mdev); } -- cgit v1.1