[nit: please properly trim the lines in your mails, this needed a reformat to be readable at all] On Thu, Jan 27, 2022 at 10:05:45AM +0900, Tetsuo Handa wrote: > I want to remove disk->open_mutex => lo->lo_mutex => I/O completion chain > itself from /proc/lockdep . Even if real deadlock does not happen due to > lo->lo_refcnt exclusion, I consider that disk->open_mutex => lo->lo_mutex > dependency being recorded is a bad sign. > It makes difficult to find real possibility of deadlock when things change > in future. I consider that lo_release() is doing too much things under > disk->open_mutex. > > I tried to defer lo->lo_mutex in lo_release() as much as possible. > But this chain still remains. Yes. To completely remove it we'd need something like: - remove lo_refcnt and rely on bd_openers on the whole device bdev - add a block layer flag to temporarily disable a gendisk and fail all opens for it. For now I'd really like to just fix the regression, though.