path: root/kerncompat.h
diff options
authorJosef Bacik <>2014-10-10 16:57:07 -0400
committerDavid Sterba <>2014-10-14 10:39:38 +0200
commitd90d8d2323cdee2bdb3b130236c801ceeb8ea875 (patch)
tree7ad61eb1363ee1c6c940c55accf54ebac37662f1 /kerncompat.h
parent6863bcf74fa8bf335d73c04248fc25ac6ada3121 (diff)
Btrfs-progs: pull back backref.c and fix it up
This patch pulls back backref.c, adds a couple of helpers everywhere that it needs, and cleans up backref.c to fit in btrfs-progs. Thanks, Signed-off-by: Josef Bacik <> [removed free_some_buffers after "do not reclaim extent buffer"] Signed-off-by: David Sterba <>
Diffstat (limited to 'kerncompat.h')
1 files changed, 7 insertions, 0 deletions
diff --git a/kerncompat.h b/kerncompat.h
index 889d94cc..520bc9e0 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -108,6 +108,9 @@ typedef __u32 u32;
typedef __u64 u64;
typedef __u16 u16;
typedef __u8 u8;
+typedef __s64 s64;
+typedef __s32 s32;
* Continuing to define __KERNEL__ breaks others parts of the code, so
* we can just undefine it now that we have the correct headers...
@@ -119,6 +122,8 @@ typedef unsigned int __u32;
typedef unsigned long long u64;
typedef unsigned char u8;
typedef unsigned short u16;
+typedef long long s64;
+typedef int s32
@@ -269,6 +274,8 @@ static inline long IS_ERR(const void *ptr)
#define kzalloc(x, y) calloc(1, x)
#define kstrdup(x, y) strdup(x)
#define kfree(x) free(x)
+#define vmalloc(x) malloc(x)
+#define vfree(x) free(x)
#define BUG_ON(c) assert_trace(#c, __FILE__, __func__, __LINE__, !(c))