Re: [PATCH 1/4] Add extended attributes to ext2/3

Andreas Dilger (adilger@clusterfs.com)
Tue, 15 Oct 2002 10:21:19 -0600


On Oct 15, 2002 17:16 +0100, Christoph Hellwig wrote:
> On Tue, Oct 15, 2002 at 10:04:17AM -0600, Andreas Dilger wrote:
> > > - mb_cache_lock();
> > > + spin_lock(&mb_cache_spinlock);
> > > l = mb_cache_lru_list.prev;
> > > while (l != &mb_cache_lru_list) {
> > > struct mb_cache_entry *ce =
> > > list_entry(l, struct mb_cache_entry, e_lru_list);
> >
> > Couldn't these all be "list_for_each{_safe}"?
>
> They'd have to be list_for_each_safe_prev, which is not currently
> in list.h. The EVMS folks have a patch to add it, though..

Is there a reason why the code can't just add items into the list in
the reverse order (i.e. list_add_tail()) and then walk in the normal
direction via list_for_each_safe()?

Cheers, Andreas

--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/