]> git.baikalelectronics.ru Git - kernel.git/commit
memstick/mspro_block: simplify refcounting
authorChristoph Hellwig <hch@lst.de>
Tue, 15 Feb 2022 09:45:13 +0000 (10:45 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Feb 2022 02:44:24 +0000 (19:44 -0700)
commita634963a582eb64a5647e51db5b8bb720cc38147
treef4317fc2c5a03a9e4640ffd3e177e8d4727e8b8a
parentf7d570ebaab9ea83c301b1dc578937f6b8caa0ad
memstick/mspro_block: simplify refcounting

Implement the ->free_disk method to free the msb_data structure only once
the last gendisk reference goes away instead of keeping a local
refcount.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220215094514.3828912-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/memstick/core/mspro_block.c