mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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: Re: [PATCH] Rename other copy of hash_string to hashlen_string
Date: 29 May 2016 08:02:46 -0400	[thread overview]
Message-ID: <20160529120246.1244.qmail@ns.sciencehorizons.net> (raw)
In-Reply-To: <CAMuHMdW4eQimrU12iHmSQiAQM8fwPQ+ZuekaYgJM8GYDuDKsNQ@mail.gmail.com>

> That version fails the test. On m68k/ARAnyM:
>
> test_hash: hashlen_string(256..256) returned length 1, expected 0

Just kill me. :-(

I didn't change that code, so I didn't re-test it.  But I changed
the test.

diff --git a/fs/namei.c b/fs/namei.c
index aefba699..dcb85255 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1958,11 +1958,11 @@ u64 hashlen_string(const char *name)
	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(hashlen_string);

  reply	other threads:[~2016-05-29 12:02 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 [this message]
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     ` [PATCH] fs/namei.c: Update !CONFIG_DCACHE_WORD_ACCESS case George Spelvin
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=20160529120246.1244.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®