]> git.baikalelectronics.ru Git - kernel.git/commit
block: unhash the whole device inode earlier
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Jul 2021 07:53:56 +0000 (09:53 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 Aug 2021 19:37:28 +0000 (13:37 -0600)
commit6b3f521be9d6f20b1d21c8709fe175fa333dd44c
tree36de0c3d2edd2acd41e718d36283d645b6e97166
parente11ef81ca8011b10d10fda67861789cacb5a1955
block: unhash the whole device inode earlier

Unhash the whole device inode early in del_gendisk.  This allows to
remove the first GENHD_FL_UP check in the open path as we simply
won't find a just removed inode.  The second non-racy check after
taking open_mutex is still kept.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210722075402.983367-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c
fs/block_dev.c