Messages in this thread | | | Date | Fri, 04 Oct 2002 09:33:34 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] add safe version of list_for_each_entry() to list.h |
| |
Matthew Wilcox wrote: > > On Fri, Oct 04, 2002 at 10:48:33AM -0500, Mark Peloquin wrote: > > list_empty() can be used on check list heads *or* > > to check if a list element is currently in a list, > > assuming the coder uses list_del_init(). However, > > if the coder chooses to use list_del() [which sets > > the prev and next fields to 0] instead, there is no > > corresponding function to indicate if that element > > is currently on a list. This function does that. > > That behaviour for list_del is new and, IMNSHO, bogus. There's now _zero_ > gain in using list_del instead of list_del_init. akpm changed it about > 5 months ago with a comment that says: > > "list_head debugging" >
It doesn't seem to have caught anyone out, so I guess we can put it back now. I'll do a patch. - 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/
| |