fs: dcache rationalise dget variants

dget_locked was a shortcut to avoid the lazy lru manipulation when we already
held dcache_lock (lru manipulation was relatively cheap at that point).
However, how that the lru lock is an innermost one, we never hold it at any
caller, so the lock cost can now be avoided. We already have well working lazy
dcache LRU, so it should be fine to defer LRU manipulations to scan time.

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
This commit is contained in:
Nick Piggin
2011-01-07 17:49:43 +11:00
父節點 357f8e658b
當前提交 dc0474be3e
共有 12 個文件被更改,包括 24 次插入47 次删除

查看文件

@@ -49,7 +49,7 @@ find_acceptable_alias(struct dentry *result,
spin_lock(&dcache_inode_lock);
list_for_each_entry(dentry, &result->d_inode->i_dentry, d_alias) {
dget_locked(dentry);
dget(dentry);
spin_unlock(&dcache_inode_lock);
if (toput)
dput(toput);