Subject: Re: [RFC PATCH 7/9] ipv4: ipmr: convert struct mfc_cache to struct list_head

From: Patrick McHardy <[email-masked]>
Date: Tue, 13 Apr 2010 13:18:26 +0200

David Miller wrote:
> From: [email-masked]
> Date: Sun, 11 Apr 2010 19:37:13 +0200
> 
>> From: Patrick McHardy <[email-masked]>
>>
>> Signed-off-by: Patrick McHardy <[email-masked]>
> 
> Great, it looks like you didn't fall into most of the
> traps that usually occur during a list_head conversion :-)
> 
> But:
> 
>> -		c->next = net->ipv4.mfc_unres_queue;
>> -		net->ipv4.mfc_unres_queue = c;
>> +		list_add_tail(&c->list, &net->ipv4.mfc_unres_queue);
>  ...
>>  	write_lock_bh(&mrt_lock);
>> -	c->next = net->ipv4.mfc_cache_array[line];
>> -	net->ipv4.mfc_cache_array[line] = c;
>> +	list_add_tail(&c->list, &net->ipv4.mfc_cache_array[line]);
>>  	write_unlock_bh(&mrt_lock);
> 
> Are you sure we mean to insert to the tail here?  It looks like a head
> insertion to me beforehand, and the fact that the previous list
> iterators start at the list head pointer seem to confirm this.

I don't think it matters since each entry only exists once and
there are no ordering requirements, but I'll change it just to
make sure.

Thanks for your review so far :)