aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-09-27 06:47:43 -0400
committerJens Axboe <axboe@carl.home.kernel.dk>2007-10-10 03:25:57 -0400
commit6712ecf8f648118c3363c142196418f89a510b90 (patch)
tree347d39a7d5a7ed96d3b1afecd28de2a0f98b98c9 /fs/buffer.c
parent5bb23a688b2de23d7765a1dd439d89c038378978 (diff)
Drop 'size' argument from bio_endio and bi_end_io
As bi_end_io is only called once when the reqeust is complete, the 'size' argument is now redundant. Remove it. Now there is no need for bio_endio to subtract the size completed from bi_size. So don't do that either. While we are at it, change bi_end_io to return void. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 0e5ec371ce72..75b51dfa5e03 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2634,13 +2634,10 @@ sector_t generic_block_bmap(struct address_space *mapping, sector_t block,
2634 return tmp.b_blocknr; 2634 return tmp.b_blocknr;
2635} 2635}
2636 2636
2637static int end_bio_bh_io_sync(struct bio *bio, unsigned int bytes_done, int err) 2637static void end_bio_bh_io_sync(struct bio *bio, int err)
2638{ 2638{
2639 struct buffer_head *bh = bio->bi_private; 2639 struct buffer_head *bh = bio->bi_private;
2640 2640
2641 if (bio->bi_size)
2642 return 1;
2643
2644 if (err == -EOPNOTSUPP) { 2641 if (err == -EOPNOTSUPP) {
2645 set_bit(BIO_EOPNOTSUPP, &bio->bi_flags); 2642 set_bit(BIO_EOPNOTSUPP, &bio->bi_flags);
2646 set_bit(BH_Eopnotsupp, &bh->b_state); 2643 set_bit(BH_Eopnotsupp, &bh->b_state);
@@ -2648,7 +2645,6 @@ static int end_bio_bh_io_sync(struct bio *bio, unsigned int bytes_done, int err)
2648 2645
2649 bh->b_end_io(bh, test_bit(BIO_UPTODATE, &bio->bi_flags)); 2646 bh->b_end_io(bh, test_bit(BIO_UPTODATE, &bio->bi_flags));
2650 bio_put(bio); 2647 bio_put(bio);
2651 return 0;
2652} 2648}
2653 2649
2654int submit_bh(int rw, struct buffer_head * bh) 2650int submit_bh(int rw, struct buffer_head * bh)