]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/namei.c
Btrfs: avoid waiting for delayed refs when we must not
[karo-tx-linux.git] / fs / namei.c
index 0062dd17eb55d0f7bc365d0e06064cfb34d43449..c42791914f8205e8608923608a44fcab5478a6ea 100644 (file)
@@ -1429,7 +1429,7 @@ unsigned int full_name_hash(const unsigned char *name, unsigned int len)
        unsigned long hash = 0;
 
        for (;;) {
-               a = *(unsigned long *)name;
+               a = load_unaligned_zeropad(name);
                if (len < sizeof(unsigned long))
                        break;
                hash += a;
@@ -1459,7 +1459,7 @@ static inline unsigned long hash_name(const char *name, unsigned int *hashp)
        do {
                hash = (hash + a) * 9;
                len += sizeof(unsigned long);
-               a = *(unsigned long *)(name+len);
+               a = load_unaligned_zeropad(name+len);
                /* Do we have any NUL or '/' bytes in this word? */
                mask = has_zero(a) | has_zero(a ^ REPEAT_BYTE('/'));
        } while (!mask);