aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-11-20 10:22:27 -0500
committerChris Mason <chris.mason@oracle.com>2008-11-20 10:22:27 -0500
commit4b4e25f2a6ddb070bab7f7dd2bd2926fb8db9e04 (patch)
treeb4417e03a187efd6a88da75a41a94020a2bb76ac /fs/btrfs/extent-tree.c
parent79683f2d685cfb6ef9c97c5194e3ce3319e80cac (diff)
Btrfs: compat code fixes
The btrfs git kernel trees is used to build a standalone tree for compiling against older kernels. This commit makes the standalone tree work with 2.6.27 Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 62d49705d14..b33e0bfb99e 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -19,6 +19,8 @@
#include <linux/pagemap.h>
#include <linux/writeback.h>
#include <linux/blkdev.h>
+#include <linux/version.h>
+#include "compat.h"
#include "hash.h"
#include "crc32c.h"
#include "ctree.h"
@@ -900,6 +902,7 @@ static int noinline remove_extent_backref(struct btrfs_trans_handle *trans,
return ret;
}
+#ifdef BIO_RW_DISCARD
static void btrfs_issue_discard(struct block_device *bdev,
u64 start, u64 len)
{
@@ -909,7 +912,7 @@ static void btrfs_issue_discard(struct block_device *bdev,
blkdev_issue_discard(bdev, start >> 9, len >> 9);
#endif
}
-
+#endif
static int noinline free_extents(struct btrfs_trans_handle *trans,
struct btrfs_root *extent_root,