Re: [PATCH] add safe version of list_for_each_entry() to list.h

Mark Peloquin (peloquin@us.ibm.com)
Fri, 4 Oct 2002 11:40:45 -0500


On 10/04/2002 at 11:00 AM, Matthew Wilcox wrote:

> That behaviour for list_del is new and, IMNSHO, bogus. There's now
_zero_
> gain in using list_del instead of list_del_init.

The only gain I've noticed is when the container
object is memset it gives implicit initialization
if one uses list_del.

> akpm changed it about
> 5 months ago with a comment that says:

> "list_head debugging"

> so i think it's pretty safe to assume that this behaviour will not
> remain into 2.6. if you think you want list_member, use list_del_init
> and list_empty() instead.

I wasn't aware this was somewhat recently added item
for debug and will switch to list_del_init().

Thanks for bring this to my attention!

-
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/