diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 19:14:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-11 19:14:22 -0700 |
commit | 1ce48904285fe4b0298864f9153a8502ebeac35c (patch) | |
tree | ffe1e0c31cdea427b48ae4d4d59a96ff9d208f32 /drivers/md/dm.c | |
parent | 55982fd184a065b1c69279d29cbc01dbf424d2f4 (diff) | |
parent | 780513ecb80ea0934fc6833efc4f5ed9ab4ff9bb (diff) |
Merge branch 'block-2.6.24' of git://git.kernel.dk/data/git/linux-2.6-block
* 'block-2.6.24' of git://git.kernel.dk/data/git/linux-2.6-block: (37 commits)
[BLOCK] Fix failing compile with BLK_DEV_IO_TRACE=n
compat_ioctl: move floppy handlers to block/compat_ioctl.c
compat_ioctl: move cdrom handlers to block/compat_ioctl.c
compat_ioctl: move BLKPG handling to block/compat_ioctl.c
compat_ioctl: move hdio calls to block/compat_ioctl.c
compat_ioctl: handle blk_trace ioctls
compat_ioctl: add compat_blkdev_driver_ioctl()
compat_ioctl: move common block ioctls to compat_blkdev_ioctl
Sysace: Don't enable IRQ until after interrupt handler is registered
Sysace: sparse fixes
Sysace: Minor coding convention fixup
drivers/block/umem: use DRIVER_NAME where appropriate
drivers/block/umem: trim trailing whitespace
drivers/block/umem: minor cleanups
drivers/block/umem: use dev_printk()
drivers/block/umem: move private include away from include/linux
Sysace: Labels in C code should not be indented.
Sysace: Add of_platform_bus binding
Sysace: Move IRQ handler registration to occur after FSM is initialized
Sysace: minor rework and cleanup changes
...
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 2120155929a..167765c4774 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -484,23 +484,20 @@ static void dec_pending(struct dm_io *io, int error) blk_add_trace_bio(io->md->queue, io->bio, BLK_TA_COMPLETE); - bio_endio(io->bio, io->bio->bi_size, io->error); + bio_endio(io->bio, io->error); } free_io(io->md, io); } } -static int clone_endio(struct bio *bio, unsigned int done, int error) +static void clone_endio(struct bio *bio, int error) { int r = 0; struct dm_target_io *tio = bio->bi_private; struct mapped_device *md = tio->io->md; dm_endio_fn endio = tio->ti->type->end_io; - if (bio->bi_size) - return 1; - if (!bio_flagged(bio, BIO_UPTODATE) && !error) error = -EIO; @@ -514,7 +511,7 @@ static int clone_endio(struct bio *bio, unsigned int done, int error) error = r; else if (r == DM_ENDIO_INCOMPLETE) /* The target will handle the io */ - return 1; + return; else if (r) { DMWARN("unimplemented target endio return value: %d", r); BUG(); @@ -530,7 +527,6 @@ static int clone_endio(struct bio *bio, unsigned int done, int error) bio_put(bio); free_tio(md, tio); - return r; } static sector_t max_io_len(struct mapped_device *md, @@ -761,7 +757,7 @@ static void __split_bio(struct mapped_device *md, struct bio *bio) ci.map = dm_get_table(md); if (!ci.map) { - bio_io_error(bio, bio->bi_size); + bio_io_error(bio); return; } @@ -803,7 +799,7 @@ static int dm_request(struct request_queue *q, struct bio *bio) * guarantee it is (or can be) handled by the targets correctly. */ if (unlikely(bio_barrier(bio))) { - bio_endio(bio, bio->bi_size, -EOPNOTSUPP); + bio_endio(bio, -EOPNOTSUPP); return 0; } @@ -820,13 +816,13 @@ static int dm_request(struct request_queue *q, struct bio *bio) up_read(&md->io_lock); if (bio_rw(bio) == READA) { - bio_io_error(bio, bio->bi_size); + bio_io_error(bio); return 0; } r = queue_io(md, bio); if (r < 0) { - bio_io_error(bio, bio->bi_size); + bio_io_error(bio); return 0; } else if (r == 0) |