diff options
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index 0062dd17eb55..c42791914f82 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1429,7 +1429,7 @@ unsigned int full_name_hash(const unsigned char *name, unsigned int len) | |||
1429 | unsigned long hash = 0; | 1429 | unsigned long hash = 0; |
1430 | 1430 | ||
1431 | for (;;) { | 1431 | for (;;) { |
1432 | a = *(unsigned long *)name; | 1432 | a = load_unaligned_zeropad(name); |
1433 | if (len < sizeof(unsigned long)) | 1433 | if (len < sizeof(unsigned long)) |
1434 | break; | 1434 | break; |
1435 | hash += a; | 1435 | hash += a; |
@@ -1459,7 +1459,7 @@ static inline unsigned long hash_name(const char *name, unsigned int *hashp) | |||
1459 | do { | 1459 | do { |
1460 | hash = (hash + a) * 9; | 1460 | hash = (hash + a) * 9; |
1461 | len += sizeof(unsigned long); | 1461 | len += sizeof(unsigned long); |
1462 | a = *(unsigned long *)(name+len); | 1462 | a = load_unaligned_zeropad(name+len); |
1463 | /* Do we have any NUL or '/' bytes in this word? */ | 1463 | /* Do we have any NUL or '/' bytes in this word? */ |
1464 | mask = has_zero(a) | has_zero(a ^ REPEAT_BYTE('/')); | 1464 | mask = has_zero(a) | has_zero(a ^ REPEAT_BYTE('/')); |
1465 | } while (!mask); | 1465 | } while (!mask); |