Whamcloud - gitweb
Use list_heads properly. In a few places we were using them incorrectly:
authoradilger <adilger>
Sat, 10 Aug 2002 09:46:25 +0000 (09:46 +0000)
committeradilger <adilger>
Sat, 10 Aug 2002 09:46:25 +0000 (09:46 +0000)
commitf90f4eb71c7617966b515c09d15706394a21ca1c
tree0a95fa3704989dce6d331597998b325ed3bbad02
parent3ef62e4aa22762fa24f2e72f65a733f94f54aa07
Use list_heads properly.  In a few places we were using them incorrectly:

BAD:  list_add(&list_item, list_head.prev);  Overwrites the adjacent field.
GOOD: list_add_tail(&list_item, list_head);

While the following usage is technically correct, it does encourage people
to use the above (incorrect) usage pattern, so it should be avoided:

BAD:  list_add(&list_item, list_head.next);
GOOD: list_add_tail(&list_item, &list_head);

Just FYI - list_add() is like a queue, while list_add_tail() is like a stack,
when iterating over items via list_for_each().
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_resource.c
lustre/obdclass/class_obd.c
lustre/obdclass/genops.c
lustre/obdfilter/filter.c