On Wed, Oct 30, 2024 at 08:42:36PM +0800, Ming Lei wrote: > commit f1be1788a32e ("block: model freeze & enter queue as lock for > supporting lockdep") tries to apply lockdep for verifying freeze & > unfreeze. However, the verification is only done the outmost freeze and > unfreeze. This way is actually not correct because q->mq_freeze_depth > still may drop to zero on other task instead of the freeze owner task. Well, that's how non-owner functions work in general. > Fix this issue by always verifying the last unfreeze lock on the owner > task context, and freeze lock is still verified on the outmost one. > > Fixes: f1be1788a32e ("block: model freeze & enter queue as lock for supporting lockdep") What does this actually fix vs just improving coverage? Because the hacks in here look pretty horrible and I'd be much happier if we didn't have them.