diff options
author | Jens Axboe <axboe@kernel.dk> | 2017-06-30 23:55:08 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-09 15:09:16 -0400 |
commit | d62e26b3ffd28f16ddae85a1babd0303a1a6dfb6 (patch) | |
tree | 622dd61c60712f31575b2cdde0811529b829ba8a /drivers/block/zram | |
parent | 7f5562d5ecc44c757599b201df928ba52fa05047 (diff) |
block: pass in queue to inflight accounting
No functional change in this patch, just in preparation for
basing the inflight mechanism on the queue in question.
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/zram')
-rw-r--r-- | drivers/block/zram/zram_drv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 856d5dc02451..1c3383b4a0cf 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c | |||
@@ -813,9 +813,10 @@ static int zram_bvec_rw(struct zram *zram, struct bio_vec *bvec, u32 index, | |||
813 | { | 813 | { |
814 | unsigned long start_time = jiffies; | 814 | unsigned long start_time = jiffies; |
815 | int rw_acct = is_write ? REQ_OP_WRITE : REQ_OP_READ; | 815 | int rw_acct = is_write ? REQ_OP_WRITE : REQ_OP_READ; |
816 | struct request_queue *q = zram->disk->queue; | ||
816 | int ret; | 817 | int ret; |
817 | 818 | ||
818 | generic_start_io_acct(rw_acct, bvec->bv_len >> SECTOR_SHIFT, | 819 | generic_start_io_acct(q, rw_acct, bvec->bv_len >> SECTOR_SHIFT, |
819 | &zram->disk->part0); | 820 | &zram->disk->part0); |
820 | 821 | ||
821 | if (!is_write) { | 822 | if (!is_write) { |
@@ -827,7 +828,7 @@ static int zram_bvec_rw(struct zram *zram, struct bio_vec *bvec, u32 index, | |||
827 | ret = zram_bvec_write(zram, bvec, index, offset); | 828 | ret = zram_bvec_write(zram, bvec, index, offset); |
828 | } | 829 | } |
829 | 830 | ||
830 | generic_end_io_acct(rw_acct, &zram->disk->part0, start_time); | 831 | generic_end_io_acct(q, rw_acct, &zram->disk->part0, start_time); |
831 | 832 | ||
832 | if (unlikely(ret)) { | 833 | if (unlikely(ret)) { |
833 | if (!is_write) | 834 | if (!is_write) |