aboutsummaryrefslogtreecommitdiffstats
path: root/kerncompat.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2014-10-10 16:57:07 -0400
committerDavid Sterba <dsterba@suse.cz>2014-10-14 10:39:38 +0200
commitd90d8d2323cdee2bdb3b130236c801ceeb8ea875 (patch)
tree7ad61eb1363ee1c6c940c55accf54ebac37662f1 /kerncompat.h
parent6863bcf74fa8bf335d73c04248fc25ac6ada3121 (diff)
downloadbtrfs-progs-d90d8d2323cdee2bdb3b130236c801ceeb8ea875.tar.gz
btrfs-progs-d90d8d2323cdee2bdb3b130236c801ceeb8ea875.tar.xz
btrfs-progs-d90d8d2323cdee2bdb3b130236c801ceeb8ea875.zip
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 <jbacik@fb.com> [removed free_some_buffers after "do not reclaim extent buffer"] Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'kerncompat.h')
-rw-r--r--kerncompat.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/kerncompat.h b/kerncompat.h
index 889d94c..520bc9e 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
#endif
@@ -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)
#ifndef BTRFS_DISABLE_BACKTRACE
#define BUG_ON(c) assert_trace(#c, __FILE__, __func__, __LINE__, !(c))