aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-09-24 11:48:04 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 15:41:59 -0400
commit2b1f55b0f0d0d1a66470ef4ea2696cd5dd741a12 (patch)
tree980019fac9b0891e682bc7d9a8c8a58284b467fc /fs/btrfs/disk-io.c
parent9b49c9b9f93e148815f2544d0c91f43b6d72eea9 (diff)
Remove Btrfs compat code for older kernels
Btrfs had compatibility code for kernels back to 2.6.18. These have been removed, and will be maintained in a separate backport git tree from now on. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index d35ca6a3f513..dffb8dabd533 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -26,11 +26,7 @@
26#include <linux/buffer_head.h> // for block_sync_page 26#include <linux/buffer_head.h> // for block_sync_page
27#include <linux/workqueue.h> 27#include <linux/workqueue.h>
28#include <linux/kthread.h> 28#include <linux/kthread.h>
29#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
30# include <linux/freezer.h> 29# include <linux/freezer.h>
31#else
32# include <linux/sched.h>
33#endif
34#include "crc32c.h" 30#include "crc32c.h"
35#include "ctree.h" 31#include "ctree.h"
36#include "disk-io.h" 32#include "disk-io.h"
@@ -373,21 +369,11 @@ out:
373 return ret; 369 return ret;
374} 370}
375 371
376#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
377static void end_workqueue_bio(struct bio *bio, int err) 372static void end_workqueue_bio(struct bio *bio, int err)
378#else
379static int end_workqueue_bio(struct bio *bio,
380 unsigned int bytes_done, int err)
381#endif
382{ 373{
383 struct end_io_wq *end_io_wq = bio->bi_private; 374 struct end_io_wq *end_io_wq = bio->bi_private;
384 struct btrfs_fs_info *fs_info; 375 struct btrfs_fs_info *fs_info;
385 376
386#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
387 if (bio->bi_size)
388 return 1;
389#endif
390
391 fs_info = end_io_wq->info; 377 fs_info = end_io_wq->info;
392 end_io_wq->error = err; 378 end_io_wq->error = err;
393 end_io_wq->work.func = end_workqueue_fn; 379 end_io_wq->work.func = end_workqueue_fn;
@@ -397,10 +383,6 @@ static int end_workqueue_bio(struct bio *bio,
397 &end_io_wq->work); 383 &end_io_wq->work);
398 else 384 else
399 btrfs_queue_worker(&fs_info->endio_workers, &end_io_wq->work); 385 btrfs_queue_worker(&fs_info->endio_workers, &end_io_wq->work);
400
401#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
402 return 0;
403#endif
404} 386}
405 387
406int btrfs_bio_wq_end_io(struct btrfs_fs_info *info, struct bio *bio, 388int btrfs_bio_wq_end_io(struct btrfs_fs_info *info, struct bio *bio,
@@ -1161,9 +1143,7 @@ void btrfs_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
1161 1143
1162static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi) 1144static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi)
1163{ 1145{
1164#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
1165 bdi_init(bdi); 1146 bdi_init(bdi);
1166#endif
1167 bdi->ra_pages = default_backing_dev_info.ra_pages; 1147 bdi->ra_pages = default_backing_dev_info.ra_pages;
1168 bdi->state = 0; 1148 bdi->state = 0;
1169 bdi->capabilities = default_backing_dev_info.capabilities; 1149 bdi->capabilities = default_backing_dev_info.capabilities;
@@ -1242,11 +1222,7 @@ static void end_workqueue_fn(struct btrfs_work *work)
1242 bio->bi_private = end_io_wq->private; 1222 bio->bi_private = end_io_wq->private;
1243 bio->bi_end_io = end_io_wq->end_io; 1223 bio->bi_end_io = end_io_wq->end_io;
1244 kfree(end_io_wq); 1224 kfree(end_io_wq);
1245#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
1246 bio_endio(bio, bio->bi_size, error);
1247#else
1248 bio_endio(bio, error); 1225 bio_endio(bio, error);
1249#endif
1250} 1226}
1251 1227
1252static int cleaner_kthread(void *arg) 1228static int cleaner_kthread(void *arg)
@@ -1673,9 +1649,7 @@ fail:
1673 1649
1674 kfree(extent_root); 1650 kfree(extent_root);
1675 kfree(tree_root); 1651 kfree(tree_root);
1676#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
1677 bdi_destroy(&fs_info->bdi); 1652 bdi_destroy(&fs_info->bdi);
1678#endif
1679 kfree(fs_info); 1653 kfree(fs_info);
1680 return ERR_PTR(err); 1654 return ERR_PTR(err);
1681} 1655}
@@ -1936,9 +1910,7 @@ int close_ctree(struct btrfs_root *root)
1936 btrfs_close_devices(fs_info->fs_devices); 1910 btrfs_close_devices(fs_info->fs_devices);
1937 btrfs_mapping_tree_free(&fs_info->mapping_tree); 1911 btrfs_mapping_tree_free(&fs_info->mapping_tree);
1938 1912
1939#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
1940 bdi_destroy(&fs_info->bdi); 1913 bdi_destroy(&fs_info->bdi);
1941#endif
1942 1914
1943 kfree(fs_info->extent_root); 1915 kfree(fs_info->extent_root);
1944 kfree(fs_info->tree_root); 1916 kfree(fs_info->tree_root);