lkml.org 
[lkml]   [2019]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep complaint
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);

?

\
 
 \ /
  Last update: 2019-02-26 18:25    [W:0.313 / U:1.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site