[ltt-dev] [PATCH take2 01/13] make marker_entry permanent

Lai Jiangshan laijs at cn.fujitsu.com
Mon Mar 2 19:54:03 EST 2009


Mathieu Desnoyers 写道:
>>  
>> +int ltt_channel_alive(const char *channel)
>> +{
>> +	int ret;
>> +	mutex_lock(&ltt_channel_mutex);
>> +	ret = !!atomic_read(&index_kref.refcount);
>> +	mutex_unlock(&ltt_channel_mutex);
> 
> Why are you taking the ltt_channel_mutex to read a variable atomically ?
> There is probably something you intend to protect (race between stopping
> to use a channel and removing a marker), but I am pretty much sure this
> locking does not do what you intend.
> 
> Mathieu
> 
>> +	return ret;
>> +}
>> +


Hi, Mathieu,

You can feel free to fix patches(comments, changelog, code) and
merge them.

Lai.




More information about the lttng-dev mailing list