]> 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)
commit674b93bd23a2d0fecb1862af72f7d8ac7ec7d6b4
tree8901f97019c05ddd88c2efa9994c7943519107d1
parentae791071f8d476f463a77725cbfaf155fc82a3bb
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