Messages in this thread Patch in this message | | | Date | 29 May 2016 08:41:52 -0400 | From | "George Spelvin" <> | Subject | [PATCH] fs/namei.c: Update !CONFIG_DCACHE_WORD_ACCESS case |
| |
From be5e653c0d5ec890c32a48851dcd0a347df8e5fa Mon Sep 17 00:00:00 2001 From: George Spelvin <linux@sciencehorizons.net> Date: Sun, 29 May 2016 01:23:14 -0400 Subject: [PATCH] fs/namei.c: Update !CONFIG_DCACHE_WORD_ACCESS case
A couple of late changes to the previous patch didn't update the !CONFIG_DCACHE_WORD_ACCESS option correspondingly. It hadn't changed, so didn't need re-testing, right?
Yeah. Let that be a lesson to me.
Specifically the caller got changed in two ways: - The function name was changed from v1 to avoid a collision. - The self-test was updated to cover zero-length strings; the function needs to be updated, too.
Signed-off-by: George Spelvin <linux@sciencehorizons.net> Fixes: fcfd2fbf22d2587196890103d41e3d554c47da0e --- Here's the combined patch, if that's preferred. Obviously Correct(tm), but I'm starting the full test quite right now.
That just takes a few hours. (I have to reboot two machines multiple times with 32- and 64-bit kernels and and test NFS between them.)
fs/namei.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c index 968dae02..dcb85255 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1952,20 +1952,20 @@ unsigned int full_name_hash(const char *name, unsigned int len) EXPORT_SYMBOL(full_name_hash); /* Return the "hash_len" (hash and length) of a null-terminated string */ -u64 hash_string(const char *name) +u64 hashlen_string(const char *name) { unsigned long hash = init_name_hash(); unsigned long len = 0, c; c = (unsigned char)*name; - do { + while (c) { len++; hash = partial_name_hash(c, hash); c = (unsigned char)name[len]; - } while (c); + } return hashlen_create(end_name_hash(hash), len); } -EXPORT_SYMBOL(hash_string); +EXPORT_SYMBOL(hashlen_string); /* * We know there's a real path component here of at least -- 2.8.1
| |