At Thu, 28 Jun 2012 05:04:52 -0400, 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. Thanks for your comment. I've applied the patch, thanks. Kazutaka |