Re: [PATCH 07/10 v7] sunrpc: Switch to using list_head instead single list

Christoph Hellwig
2015-07-11T12:54:29Z

> + struct list_head * hash_table;

For hash lists it might be useful to use a hlist_head structure, as that
avoids bloating the actual hash table while still allowing easy removal
of an entry.

> - for (hp=head; *hp != NULL ; hp = &(*hp)->next) {
> - struct cache_head *tmp = *hp;
> + list_for_each_safe(pos, tpos, head) {
> + tmp = list_entry(pos, struct cache_head, cache_list);

Please use the _entry iteration macros that consolidate these two.