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
---
drivers/memstick/core/ms_block.c | 64
drivers/memstick/core/ms_block.h | 1
On Wed, Feb 09, 2022 at 09:21:17AM +0100, Christoph Hellwig wrote:
> 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.
>
The approach looks good, just the error handling needs to be careful,
such
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
---
drivers/memstick/core/ms_block.c | 64
drivers/memstick/core/ms_block.h | 1