# Re: \[PATCH 12/26\] bcache: convert to blk\_alloc\_disk/blk\_cleanup\_disk

- From: Coly Li \<hidden\>
- Date: 2021-05-23 16:19:22 
- List: linux-bcache
- Page: https://ratatoskr.run/linux-bcache/2021/05/6402891
- Thread: https://ratatoskr.run/linux-block/2021/05/6402806/t.md

```text
On 5/21/21 2:23 PM, Christoph Hellwig wrote:
> On Fri, May 21, 2021 at 02:15:32PM +0800, Coly Li wrote:
>> The  above 2 lines are added on purpose to prevent an refcount
>> underflow. It is from commit 86da9f736740 ("bcache: fix refcount
>> underflow in bcache_device_free()").
>>
>> Maybe add a parameter to blk_cleanup_disk() or checking (disk->flags &
>> GENHD_FL_UP) inside blk_cleanup_disk() ?
> 
> Please take a look at patch 4 in the series.
> 

Thanks for the hint. I will reply in your patch.


Coly Li
```
