[PATCH 2/5] memstick/ms_block: simplify refcounting

2022-02-15 Thread Christoph Hellwig
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

Re: [PATCH 2/5] memstick/ms_block: simplify refcounting

2022-02-10 Thread Ming Lei
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

[PATCH 2/5] memstick/ms_block: simplify refcounting

2022-02-09 Thread Christoph Hellwig
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