On 06/28/2012 05:04 PM, Christoph Hellwig wrote: > On Thu, Jun 28, 2012 at 04:59:50PM +0800, Liu Yuan wrote: >> Let's wait for Christoph's comment to see if he has any smarter >> alternative. I have taken a glance at the Linux kernel's list.h and >> didn't find a helper that check if entry is added or not either. >> >> If we don't come up with any better method, let's merge it tomorrow. > > The kernel uses list_emptry for entries. Using list_del_init and > checking with list_empty if entries are members of a list is a very > common pattern in the kernel. > Okay, I think we'd better add some more helpers to distinguish list and entry check to make the code more readable. I am going to merge this fix right now Thanks, Yuan |