Btrfs: bio_endio support for linux 2.6.23 and older.
authorMiguel <miguel.filipe@gmail.com>
Fri, 11 Apr 2008 19:50:59 +0000 (15:50 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:01 +0000 (11:04 -0400)
bio_endio() changed prototype on linux 2.6.24, support older kernels
using the older prototype.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/disk-io.c
fs/btrfs/volumes.c

index 0bfcc31..aebe8c2 100644 (file)
@@ -949,11 +949,14 @@ void btrfs_end_io_csum(struct work_struct *work)
                bio->bi_private = end_io_wq->private;
                bio->bi_end_io = end_io_wq->end_io;
                kfree(end_io_wq);
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
+               bio_endio(bio, bio->bi_size, err);
+#else
                bio_endio(bio, error);
+#endif
        }
 }
 
-
 struct btrfs_root *open_ctree(struct super_block *sb,
                              struct btrfs_fs_devices *fs_devices)
 {
index 07d4355..82bc6cf 100644 (file)
@@ -960,7 +960,11 @@ static int end_bio_multi_stripe(struct bio *bio,
                        err = multi->error;
                kfree(multi);
 
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
+               bio_endio(bio, bio->bi_size, err);
+#else
                bio_endio(bio, err);
+#endif
        } else {
                bio_put(bio);
        }