[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100812071431.GF645@bicker>
Date: Thu, 12 Aug 2010 09:14:31 +0200
From: Dan Carpenter <error27@...il.com>
To: Julia Lawall <julia@...u.dk>
Cc: Joel Becker <Joel.Becker@...cle.com>,
Mark Fasheh <mfasheh@...e.com>, ocfs2-devel@....oracle.com,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Sunil Mushran <sunil.mushran@...cle.com>
Subject: Re: [PATCH 1/2] fs/ocfs2/dlm: Eliminate update of
list_for_each_entry loop cursor
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists