sdio_init() initializes pages_in_io to 2 for an unaligned directio request
in order that a zero page may be written to the first and last block.
However, __blockdev_direct_IO_bvec was setting pages_in_io to the number
of pages in the request rather than adding them to the original value.
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
sdio_init(&sdio, inode, offset, blkbits, get_block, submit_io);
- sdio.pages_in_io = bvec_len;
+ sdio.pages_in_io += bvec_len;
for (i = 0; i < bvec_len; i++) {
sdio.size += bvec[i].bv_len;