]> git.baikalelectronics.ru Git - kernel.git/commit
block: change the refcounting for partitions
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Jul 2021 07:53:58 +0000 (09:53 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 Aug 2021 19:37:28 +0000 (13:37 -0600)
commitb5f1feb3efb549a55b4136ddb4378ad70ea92b31
tree13db699bd15205a45a9b571c4d8643000f9b61dc
parent93c24214da3561bc6262e5751e023f340de51fc4
block: change the refcounting for partitions

Instead of acquiring an inode reference on open make sure partitions
always hold device model references to the disk while alive, and switch
open to grab only a device model reference to the opened block device.
If that is a partition the disk reference is transitively held by the
partition already.

Link: https://lore.kernel.org/r/20210722075402.983367-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partitions/core.c
fs/block_dev.c