From: David Howells Date: Sat, 25 Mar 2006 11:06:36 +0000 (-0800) Subject: [PATCH] Optimise d_find_alias() X-Git-Tag: v2.6.17-rc1~859 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=214fda1f6e1b8ef2a5292b0372744037fc80d318;p=pandora-kernel.git [PATCH] Optimise d_find_alias() The attached patch optimises d_find_alias() to only take the spinlock if there's anything in the the inode's alias list. If there isn't, it returns NULL immediately. With respect to the superblock sharing patch, this should reduce by one the number of times the dcache_lock is taken by nfs_lookup() for ordinary directory lookups. Only in the case where there's already a dentry for particular directory inode (such as might happen when another mountpoint is rooted at that dentry) will the lock then be taken the extra time. Signed-off-by: David Howells Cc: Trond Myklebust Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed