diff options
author | Christoph Hellwig <hch@lst.de> | 2021-05-14 16:18:41 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-05-20 16:59:35 +0300 |
commit | 6c60ff048ca1e0739f39aa25996543c6e662a46c (patch) | |
tree | 2cbd9f0a9f9c0e49600c999500d7c388e6c8ec4e /tools/perf/scripts/python/stat-cpi.py | |
parent | 9a66e6bd7e9ba51d83854aaf7670014e9538e462 (diff) | |
download | linux-6c60ff048ca1e0739f39aa25996543c6e662a46c.tar.xz |
block: prevent block device lookups at the beginning of del_gendisk
As an artifact of how gendisk lookup used to work in earlier kernels,
GENHD_FL_UP is only cleared very late in del_gendisk, and a global lock
is used to prevent opens from succeeding while del_gendisk is tearing
down the gendisk. Switch to clearing the flag early and under bd_mutex
so that callers can use bd_mutex to stabilize the flag, which removes
the need for the global mutex.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20210514131842.1600568-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions