if (stream->is_metadata && stream->trace->viewer_metadata_stream) {
ERR("Cannot attach viewer metadata stream to trace (busy).");
- goto error_unlock;
+ goto error;
}
switch (seek_t) {
tracefile_array_get_seq_head(stream->tfa) + 1;
break;
default:
- goto error_unlock;
+ goto error;
}
/*
if (chunk_status == LTTNG_TRACE_CHUNK_STATUS_NO_FILE) {
vstream->index_file = NULL;
} else {
- goto error_unlock;
+ goto error;
}
}
}
vstream->current_tracefile_id, NULL, file_path,
sizeof(file_path));
if (ret < 0) {
- goto error_unlock;
+ goto error;
}
status = lttng_trace_chunk_open_fs_handle(
O_RDONLY, 0, &vstream->stream_file.handle,
true);
if (status != LTTNG_TRACE_CHUNK_STATUS_OK) {
- goto error_unlock;
+ goto error;
}
}
lseek_ret = fs_handle_seek(
vstream->index_file->file, 0, SEEK_END);
if (lseek_ret < 0) {
- goto error_unlock;
+ goto error;
}
}
if (stream->is_metadata) {
return vstream;
-error_unlock:
- pthread_mutex_unlock(&stream->lock);
error:
if (vstream) {
viewer_stream_destroy(vstream);