]> git.baikalelectronics.ru Git - kernel.git/commit
mtip32xx: fix device removal
authorChristoph Hellwig <hch@lst.de>
Sun, 19 Jun 2022 06:05:48 +0000 (08:05 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 28 Jun 2022 12:30:26 +0000 (06:30 -0600)
commit66d2c18990ae0bd39589d7e20fb2b89a25039710
tree9a9e981a062bddd8eebaac61dfd2930596861b29
parentc0e5d98fe1093159ec1175ed3a4248c152a2841c
mtip32xx: fix device removal

Use the proper helper to mark a surpise removal, remove the gendisk as
soon as possible when removing the device and implement the ->free_disk
callback to ensure the private data is alive as long as the gendisk has
references.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20220619060552.1850436-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/mtip32xx/mtip32xx.c
drivers/block/mtip32xx/mtip32xx.h