summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/hash.h')
-rw-r--r--fs/btrfs/hash.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/hash.h b/fs/btrfs/hash.h
index 868ee17ca77a..2a020b276768 100644
--- a/fs/btrfs/hash.h
+++ b/fs/btrfs/hash.h
@@ -18,5 +18,10 @@
#ifndef __HASH__
#define __HASH__
-u64 btrfs_name_hash(const char *name, int len);
+
+#include "crc32c.h"
+static inline u64 btrfs_name_hash(const char *name, int len)
+{
+ return btrfs_crc32c((u32)~1, name, len);
+}
#endif