Some questions about struct dentry involved with list
In kernel-2.4.20, the attribute d_hash in struct dentry is type of list_head. So you can use function list_empty defined in list.h to check whether the hash list is empty.
But in kernel-2.6.27, the type of the attribute d_hash has been changed to hlist_node, then if you want to check whether the hash list is empty, the function list_empty will not work any more.
What should I do to solve the problem??
Another question is that there are two function concerned with hlist defined in list.h: hlist_unhash and hlist_empty. What are the differences between the two functions?
|