]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/direct-io.c
block: prep work for batch completion
[karo-tx-linux.git] / fs / direct-io.c
index af02dd877887d3bbac19da8178055252762e2a55..5e2a62beee4348a6cce784aa218ac3527cb63fd5 100644 (file)
@@ -324,12 +324,12 @@ static void dio_bio_end_io(struct bio *bio, int error)
  * so that the DIO specific endio actions are dealt with after the filesystem
  * has done it's completion work.
  */
-void dio_end_io(struct bio *bio, int error)
+void dio_end_io(struct bio *bio, int error, struct batch_complete *batch)
 {
        struct dio *dio = bio->bi_private;
 
        if (dio->is_async)
-               dio_bio_end_aio(bio, error);
+               dio_bio_end_aio(bio, error, batch);
        else
                dio_bio_end_io(bio, error);
 }
@@ -350,10 +350,7 @@ dio_bio_alloc(struct dio *dio, struct dio_submit *sdio,
 
        bio->bi_bdev = bdev;
        bio->bi_sector = first_sector;
-       if (dio->is_async)
-               bio->bi_end_io = dio_bio_end_aio;
-       else
-               bio->bi_end_io = dio_bio_end_io;
+       bio->bi_end_io = dio_end_io;
 
        sdio->bio = bio;
        sdio->logical_offset_in_bio = sdio->cur_page_fs_offset;