X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fdirect-io.c;h=48d74c7391d13f4f07393c45d19825e937ecbcd1;hb=0cb59c9953171e9adf6da8142a5c85ceb77bb60d;hp=51f270b479b6938a4a730ea56f9011c30f99563f;hpb=3dc8d7f07e7496c0c6702e7e4b1acc179fa94019;p=~andy%2Flinux diff --git a/fs/direct-io.c b/fs/direct-io.c index 51f270b479b..48d74c7391d 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -634,7 +634,7 @@ static int dio_send_cur_page(struct dio *dio) int ret = 0; if (dio->bio) { - loff_t cur_offset = dio->block_in_file << dio->blkbits; + loff_t cur_offset = dio->cur_page_fs_offset; loff_t bio_next_offset = dio->logical_offset_in_bio + dio->bio->bi_size; @@ -659,7 +659,7 @@ static int dio_send_cur_page(struct dio *dio) * Submit now if the underlying fs is about to perform a * metadata read */ - if (dio->boundary) + else if (dio->boundary) dio_bio_submit(dio); }