From: "George Spelvin" <linux@sciencehorizons.net>
To: geert@linux-m68k.org, linux@sciencehorizons.net
Cc: linux-kernel@vger.kernel.org, linux@roeck-us.net,
torvalds@linux-foundation.org
Subject: [PATCH] fs/namei.c: Update !CONFIG_DCACHE_WORD_ACCESS case
Date: 29 May 2016 08:41:52 -0400 [thread overview]
Message-ID: <20160529124152.4925.qmail@ns.sciencehorizons.net> (raw)
In-Reply-To: <CAMuHMdW4eQimrU12iHmSQiAQM8fwPQ+ZuekaYgJM8GYDuDKsNQ@mail.gmail.com>
>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
next prev parent reply other threads:[~2016-05-29 12:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-29 5:18 Build errors in mainline due to "fs/namei.c:,Add hashlen_string() function" Guenter Roeck
2016-05-29 5:22 ` George Spelvin
2016-05-29 5:26 ` [PATCH] Rename other copy of hash_string to hashlen_string George Spelvin
2016-05-29 10:48 ` Geert Uytterhoeven
2016-05-29 12:02 ` George Spelvin
2016-05-29 12:12 ` [PATCH] fs/namei.c. If we way we want zero-length string support, mean it George Spelvin
2016-05-29 17:13 ` Geert Uytterhoeven
2016-05-29 12:41 ` George Spelvin [this message]
2016-05-29 5:50 ` Build errors in mainline due to "fs/namei.c:,Add hashlen_string() function" George Spelvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160529124152.4925.qmail@ns.sciencehorizons.net \
--to=linux@sciencehorizons.net \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®