# Re: fix a race between del\_gendisk and BLKRRPART v2

- From: Christoph Hellwig \<hch@lst.de\>
- Date: 2021-05-20 08:14:50 
- List: linux-block
- Page: https://ratatoskr.run/linux-block/2021/05/6402771
- Thread: https://ratatoskr.run/linux-block/2021/05/6402665/t.md

```text
Jens,

can you take a look at these?

On Fri, May 14, 2021 at 03:18:40PM +0200, Christoph Hellwig wrote:
> Hi all,
> 
> this is based of a patch from Gulam and suggestions from Ming and fixes a
> race between del_gendisk and BLKRRPART while also removing a global lock.
> 
> Changes since v1:
>  - fix the GENHD_FL_UP check in __blkdev_get
>  - don't change where remove_inode_hash is called for now
>  - improve the commit message
> 
> Diffstat:
>  block/genhd.c         |   11 +----------
>  fs/block_dev.c        |   18 ++++++++----------
>  include/linux/genhd.h |    2 --
>  3 files changed, 9 insertions(+), 22 deletions(-)
---end quoted text---
```
