lkml.org 
[lkml]   [2013]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/2] introduce list_for_each_entry_del
On 06/04/13 16:53, Chris Mason wrote:
> Quoting Christoph Hellwig (2013-06-04 10:48:56)
>> On Mon, Jun 03, 2013 at 03:55:55PM -0400, J??rn Engel wrote:
>>> Actually, when I compare the two invocations, I prefer the
>>> list_for_each_entry_del() variant over list_pop_entry().
>>>
>>> while ((ref = list_pop_entry(&prefs, struct __prelim_ref, list))) {
>>> list_for_each_entry_del(ref, &prefs, list) {
>>>
>>> Christoph?
>>
>> I really don't like something that looks like an iterator (*for_each*)
>> to modify a list. Maybe it's just me, so I'd love to hear others chime
>> in.
>
> Have to agree with Christoph. I just couldn't put my finger on why I
> didn't like it until I saw the list_pop_entry suggestion.

list_pop_each_entry?

>
> -chris
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>



\
 
 \ /
  Last update: 2013-06-04 22:41    [W:0.069 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site