提交 73f61b2a 编写于 作者: M Miguel 提交者: Chris Mason

Btrfs: bio_endio support for linux 2.6.23 and older.

bio_endio() changed prototype on linux 2.6.24, support older kernels
using the older prototype.
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 594994aa
...@@ -949,11 +949,14 @@ void btrfs_end_io_csum(struct work_struct *work) ...@@ -949,11 +949,14 @@ void btrfs_end_io_csum(struct work_struct *work)
bio->bi_private = end_io_wq->private; bio->bi_private = end_io_wq->private;
bio->bi_end_io = end_io_wq->end_io; bio->bi_end_io = end_io_wq->end_io;
kfree(end_io_wq); 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); bio_endio(bio, error);
#endif
} }
} }
struct btrfs_root *open_ctree(struct super_block *sb, struct btrfs_root *open_ctree(struct super_block *sb,
struct btrfs_fs_devices *fs_devices) struct btrfs_fs_devices *fs_devices)
{ {
......
...@@ -960,7 +960,11 @@ static int end_bio_multi_stripe(struct bio *bio, ...@@ -960,7 +960,11 @@ static int end_bio_multi_stripe(struct bio *bio,
err = multi->error; err = multi->error;
kfree(multi); kfree(multi);
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
bio_endio(bio, bio->bi_size, err);
#else
bio_endio(bio, err); bio_endio(bio, err);
#endif
} else { } else {
bio_put(bio); bio_put(bio);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册