From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Thu, 12 Aug 2010 07:14:31 +0000 Subject: Re: [PATCH 1/2] fs/ocfs2/dlm: Eliminate update of Message-Id: <20100812071431.GF645@bicker> List-Id: References: <20100812000355.GA7195@mail.oracle.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Julia Lawall Cc: Joel Becker , Mark Fasheh , ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Sunil Mushran On Thu, Aug 12, 2010 at 07:46:13AM +0200, Julia Lawall wrote: > > This seems a bit ugly to me, since it exposes the implementation of the > list abstraction. What about the following: > > lock = NULL; > list_for_each_entry(x, tmpq, list) { > if (x->ml.cookie = ml->cookie) { > lock = x; > break; > } > } > I agree with you that it's ugly as pants. Maybe someone could write an at_list_start() macro? regards, dan carpenter