diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-03 02:32:59 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-03 02:32:59 +0400 |
commit | 0145acc202ca613b23b5383e55df3c32a92ad1bf (patch) | |
tree | 779292f953fb9845252295679fb712faf7f52624 /include/linux | |
parent | 8966be90304b394fd6a2c5af7b6b3abe2df3889c (diff) | |
download | linux-0145acc202ca613b23b5383e55df3c32a92ad1bf.tar.xz |
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/linux')
-rw-r--r-- | include/linux/dcache.h | 9 |
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) } /* Compute the hash for a name string. */ -static inline unsigned int -full_name_hash(const unsigned char *name, unsigned int len) -{ - unsigned long hash = init_name_hash(); - while (len--) - hash = partial_name_hash(*name++, hash); - return end_name_hash(hash); -} +extern unsigned int full_name_hash(const unsigned char *, unsigned int); /* * Try to keep struct dentry aligned on 64 byte cachelines (this will |