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

Signed-off-by: Lars Ellenberg <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Lars Ellenberg 2018-12-20 17:23:29 +01:00 • committed by Jens Axboe
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;
}