4.14-stable review patch.  If anyone has any objections, please let me know.


From: Jiufei Xue <jiufei....@linux.alibaba.com>

commit 7c5a0dcf557c6511a61e092ba887de28882fe857 upstream.

The vm counters is counted in sectors, so we should do the conversation
in submit_bio.

Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and 
partitions index")
Cc: sta...@vger.kernel.org
Reviewed-by: Omar Sandoval <osan...@fb.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Signed-off-by: Jiufei Xue <jiufei....@linux.alibaba.com>
Signed-off-by: Jens Axboe <ax...@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

 block/blk-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2277,7 +2277,7 @@ blk_qc_t submit_bio(struct bio *bio)
                unsigned int count;
                if (unlikely(bio_op(bio) == REQ_OP_WRITE_SAME))
-                       count = queue_logical_block_size(bio->bi_disk->queue);
+                       count = queue_logical_block_size(bio->bi_disk->queue) 
>> 9;
                        count = bio_sectors(bio);

Reply via email to