[PATCH v7 4/4] dcache: Enable lockless update of dentry's refcount

2013-08-05 Thread Waiman Long
The current code takes the dentry's d_lock lock whenever the refcnt is being updated. In reality, nothing big really happens until refcnt 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 refcnt should not be

[PATCH v7 4/4] dcache: Enable lockless update of dentry's refcount

2013-08-05 Thread Waiman Long
The current code takes the dentry's d_lock lock whenever the refcnt is being updated. In reality, nothing big really happens until refcnt 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 refcnt should not be