[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210309171931.GA201344@infradead.org>
Date: Tue, 9 Mar 2021 17:19:31 +0000
From: Christoph Hellwig <hch@...radead.org>
To: Sergei Shtepa <sergei.shtepa@...am.com>
Cc: snitzer@...hat.com, agk@...hat.com, hare@...e.de, song@...nel.org,
axboe@...nel.dk, dm-devel@...hat.com, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
linux-api@...r.kernel.org, pavel.tide@...am.com
Subject: Re: [PATCH v6 1/4] block: add blk_mq_is_queue_frozen()
On Wed, Mar 03, 2021 at 03:30:15PM +0300, Sergei Shtepa wrote:
> +bool blk_mq_is_queue_frozen(struct request_queue *q)
> +{
> + bool ret;
> +
> + mutex_lock(&q->mq_freeze_lock);
> + ret = percpu_ref_is_dying(&q->q_usage_counter) && percpu_ref_is_zero(&q->q_usage_counter);
Please avoid the overly long line.
Also maybe frozen is a better name for the variable currently called
ret?
Powered by blists - more mailing lists