]> 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)
commit90bba9c59d7573ece19a35eb83d78669badf8577
tree9a9e981a062bddd8eebaac61dfd2930596861b29
parent2edcc0116627b118093df43bfc0f8d52fe1afa32
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