INIT_LIST_HEAD(&device->peer_devices);
list_add(&peer_device->peer_devices, &device->peer_devices);
kref_get(&connection->kref);
+ device->resource = connection->resource;
peer_device->connection = connection;
peer_device->device = device;
first_peer_device(adm_ctx.device)->connection != adm_ctx.connection) {
pr_warning("request: minor=%u, resource=%s; but that minor belongs to connection %s\n",
adm_ctx.minor, adm_ctx.resource_name,
- first_peer_device(adm_ctx.device)->connection->resource->name);
+ adm_ctx.device->resource->name);
drbd_msg_put_info("minor exists in different resource");
return ERR_INVALID_REQUEST;
}
pr_warning("request: minor=%u, volume=%u; but that minor is volume %u in %s\n",
adm_ctx.minor, adm_ctx.volume,
adm_ctx.device->vnr,
- first_peer_device(adm_ctx.device)->connection->resource->name);
+ adm_ctx.device->resource->name);
drbd_msg_put_info("minor exists as different volume");
return ERR_INVALID_REQUEST;
}