summaryrefslogtreecommitdiff
path: root/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'hash.h')
-rw-r--r--hash.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/hash.h b/hash.h
index 868ee17c..804fcdac 100644
--- a/hash.h
+++ b/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 crc32c((u32)~1, name, len);
+}
#endif