From mboxrd@z Thu Jan 1 00:00:00 1970 From: laijs@cn.fujitsu.com (Lai Jiangshan) Date: Tue, 03 Mar 2009 08:54:03 +0800 Subject: [ltt-dev] [PATCH take2 01/13] make marker_entry permanent In-Reply-To: <20090223163425.GA31815@Krystal> References: <498A5D79.8010701@cn.fujitsu.com> <20090223163425.GA31815@Krystal> Message-ID: <49AC7FAB.3000407@cn.fujitsu.com> Mathieu Desnoyers ??: >> >> +int ltt_channel_alive(const char *channel) >> +{ >> + int ret; >> + mutex_lock(<t_channel_mutex); >> + ret = !!atomic_read(&index_kref.refcount); >> + mutex_unlock(<t_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.