]> git.baikalelectronics.ru Git - kernel.git/commit
block: do not reassig ->bi_bdev when partition remapping
authorChristoph Hellwig <hch@lst.de>
Sun, 24 Jan 2021 10:02:36 +0000 (11:02 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 01:17:20 +0000 (18:17 -0700)
commitc9a082eca9066109a62f40508a166d5318145eaf
tree8901f97019c05ddd88c2efa9994c7943519107d1
parentc9c8986c5b1f872c10c712b1a3beb6b6b98b168e
block: do not reassig ->bi_bdev when partition remapping

There is no good reason to reassign ->bi_bdev when remapping the
partition-relative block number to the device wide one, as all the
information required by the drivers comes from the gendisk anyway.

Keeping the original ->bi_bdev alive will allow to greatly simplify
the partition-away I/O accounting.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
include/linux/bio.h
include/linux/blk_types.h