[PATCH RFC 2/2] dcache: Locklessly update d_count whenever possible

2013-06-19 Thread Waiman Long
The current code takes the dentry's d_lock lock whenever the d_count reference count is being updated. In reality, nothing big really happens until d_count goes to 0 in dput(). So it is not necessary to take the lock if the reference count won't go to 0. On the other hand, there are cases where

[PATCH RFC 2/2] dcache: Locklessly update d_count whenever possible

2013-06-19 Thread Waiman Long
The current code takes the dentry's d_lock lock whenever the d_count reference count is being updated. In reality, nothing big really happens until d_count goes to 0 in dput(). So it is not necessary to take the lock if the reference count won't go to 0. On the other hand, there are cases where