drbd: must not use connection after kref_put(&connection->kref)

Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Lars Ellenberg 2018-12-20 17:23:29 +01:00 committed by Jens Axboe
parent d29e89e349
commit 792c3fdd94

View File

@ -2109,9 +2109,8 @@ static int w_after_conn_state_ch(struct drbd_work *w, int unused)
spin_unlock_irq(&connection->resource->req_lock);
}
}
kref_put(&connection->kref, drbd_destroy_connection);
conn_md_sync(connection);
kref_put(&connection->kref, drbd_destroy_connection);
return 0;
}