- ret = -EINVAL;
- goto error;
- }
-
- /*
- * Account the metadata channel first to make sure the
- * number of channels waiting for a rotation cannot
- * reach 0 before we complete the iteration over all
- * the channels.
- */
- ret = rotate_add_channel_pending(
- reg->registry->reg.ust->metadata_key,
- LTTNG_DOMAIN_UST, session);
- if (ret < 0) {
- ret = reg->bits_per_long == 32 ?
- -LTTNG_ERR_UST_CONSUMER32_FAIL :
- -LTTNG_ERR_UST_CONSUMER64_FAIL;