diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 4f83fd922377..785e61c9a810 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -3235,10 +3236,12 @@ void submit_bio(int rw, struct bio *bio) BIO_BUG_ON(!bio->bi_size); BIO_BUG_ON(!bio->bi_io_vec); bio->bi_rw |= rw; - if (rw & WRITE) + if (rw & WRITE) { count_vm_events(PGPGOUT, count); - else + } else { + task_io_account_read(bio->bi_size); count_vm_events(PGPGIN, count); + } if (unlikely(block_dump)) { char b[BDEVNAME_SIZE];