[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHk-=wgK7+TtDRbSAmcM5ihBDxF4eCg7zAXDkrNm7DOg+RtzyA@mail.gmail.com>
Date: Thu, 19 Sep 2019 10:41:33 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Christoph Hellwig <hch@....de>
Cc: "Darrick J. Wong" <darrick.wong@...cle.com>,
"Darrick J. Wong" <djwong@...nel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-xfs <linux-xfs@...r.kernel.org>,
Dave Chinner <david@...morbit.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Eric Sandeen <sandeen@...deen.net>,
Andreas Gruenbacher <agruenba@...hat.com>,
Bob Peterson <rpeterso@...hat.com>,
cluster-devel <cluster-devel@...hat.com>
Subject: Re: [GIT PULL] iomap: new code for 5.4
On Thu, Sep 19, 2019 at 10:07 AM Christoph Hellwig <hch@....de> wrote:
>
> I personally surived with it, but really hated writing the open coded
> list_for_each_entry + list_del or while list_first_entry_or_null +
> ┐ist_del when I could have a nice primitive for it. I finally decided
> to just add that helper..
You realize that the list helper is even mis-named?
Generally a "pop()" should pop the last entry, not the first one. Or
course, which one is last and which one is first is entirely up to you
since you can add at the tail or the beginning. So even the name is
ambiguous.
So I really think the whole thing was badly implemented (and yes, part
of that was the whole implementation thing).
Doing list_del() by hand also means that you can actually decide if
you want list_del_init() or not. So it's
But again - keep that helper if you want it. Just don't put a badly
implemented and badly named "helper" it in a global header file that
_everybody_ has to look at.
Linus
Powered by blists - more mailing lists