aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-02 17:32:59 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-02 17:32:59 -0500
commit0145acc202ca613b23b5383e55df3c32a92ad1bf (patch)
tree779292f953fb9845252295679fb712faf7f52624 /include
parent8966be90304b394fd6a2c5af7b6b3abe2df3889c (diff)
vfs: uninline full_name_hash()
.. and also use it in lookup_one_len() rather than open-coding it. There aren't any performance-critical users, so inlining it is silly. But it wouldn't matter if it wasn't for the fact that the word-at-a-time dentry name patches want to conditionally replace the function, and uninlining it sets the stage for that. So again, this is a preparatory patch that doesn't change any semantics, and only prepares for a much cleaner and testable word-at-a-time dentry name accessor patch. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dcache.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 61b24261e07a..f1c7eb8461be 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -89,14 +89,7 @@ static inline unsigned long end_name_hash(unsigned long hash)
89} 89}
90 90
91/* Compute the hash for a name string. */ 91/* Compute the hash for a name string. */
92static inline unsigned int 92extern unsigned int full_name_hash(const unsigned char *, unsigned int);
93full_name_hash(const unsigned char *name, unsigned int len)
94{
95 unsigned long hash = init_name_hash();
96 while (len--)
97 hash = partial_name_hash(*name++, hash);
98 return end_name_hash(hash);
99}
100 93
101/* 94/*
102 * Try to keep struct dentry aligned on 64 byte cachelines (this will 95 * Try to keep struct dentry aligned on 64 byte cachelines (this will