On Tue, 2019-02-26 at 18:24 +0100, Peter Zijlstra wrote: > On Thu, Feb 14, 2019 at 03:00:56PM -0800, Bart Van Assche wrote: > > @@ -472,7 +473,8 @@ struct blk_flush_queue *blk_alloc_flush_queue(struct > > request_queue *q, > > if (!fq) > > goto fail; > > > > - spin_lock_init(&fq->mq_flush_lock); > > + lockdep_register_key(&fq->key); > > + spin_lock_init_key(&fq->mq_flush_lock, &fq->key); > > What's wrong with: > > spin_lock_init(&fq->wq_flush_lock); > lockdep_register_key(&fq->key); > lockdep_set_class(&fq->wq_flush_lock, &fq->key); > > ?
Hi Peter, That's an approach that I had not yet considered. I'm fine with the lockdep_set_class() version. Bart.