]> www.infradead.org Git - users/hch/block.git/commit
block: do not reassig ->bi_bdev when partition remapping
authorChristoph Hellwig <hch@lst.de>
Sat, 23 Jan 2021 17:06:26 +0000 (18:06 +0100)
committerChristoph Hellwig <hch@lst.de>
Sat, 23 Jan 2021 21:02:08 +0000 (22:02 +0100)
commit912d0814e5fad80ab9f173df613c6ee1e81ea0c7
tree74661be9b5a79f34083715716ae322525d8a2308
parent1321f40b6d5abb6bf1b27d5eda5084831ee82cba
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>
block/blk-core.c
include/linux/bio.h
include/linux/blk_types.h