From c172824a620459b744f9cea266c544110f183eb4 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 22 Mar 2012 15:58:27 -0700 Subject: [PATCH] --- yaml --- r: 293924 b: refs/heads/master c: 989412bbd2835f1475d1528846693eddbac744c8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 553b2a98809f..f93f8e806429 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f1e6e523e43e312c0e0d38c09828d53e9f709fc +refs/heads/master: 989412bbd2835f1475d1528846693eddbac744c8 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index bd313d680d34..99a34717b2b0 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -1455,15 +1455,10 @@ unsigned int full_name_hash(const unsigned char *name, unsigned int len) } EXPORT_SYMBOL(full_name_hash); -#ifdef CONFIG_64BIT -#define ONEBYTES 0x0101010101010101ul -#define SLASHBYTES 0x2f2f2f2f2f2f2f2ful -#define HIGHBITS 0x8080808080808080ul -#else -#define ONEBYTES 0x01010101ul -#define SLASHBYTES 0x2f2f2f2ful -#define HIGHBITS 0x80808080ul -#endif +#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) +#define ONEBYTES REPEAT_BYTE(0x01) +#define SLASHBYTES REPEAT_BYTE('/') +#define HIGHBITS REPEAT_BYTE(0x80) /* Return the high bit set in the first byte that is a zero */ static inline unsigned long has_zero(unsigned long a)