diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-02 23:32:59 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-02 23:32:59 +0100 |
commit | 0145acc202ca613b23b5383e55df3c32a92ad1bf (patch) | |
tree | 779292f953fb9845252295679fb712faf7f52624 /include | |
parent | vfs: trivial __d_lookup_rcu() cleanups (diff) | |
download | linux-0145acc202ca613b23b5383e55df3c32a92ad1bf.tar.xz linux-0145acc202ca613b23b5383e55df3c32a92ad1bf.zip |
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.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 |