Re: [PATCH v5 05/10] blk-mq: Unregister debugfs attributes earlier

Bart Van Assche
2017-04-26T20:38:11Z

On Tue, 2017-04-25 at 14:41 -0700, Jens Axboe wrote:
> Looks fine to me. However, I think there's room for improvement here.
> Why don't we just make it:
>=20
> if (!q->mq_ops) {
> spin_lock_irq(lock);
> __blk_drain_queue(q, true);
> } else {
> blk_mq_debugfs_unregister_mq(q);
> spin_lock_irq(lock);
> }
>=20
> queue_flag_set(QUEUE_FLAG_DEAD, q);
> [...]
>=20
> Would seem much more readable to me, and less dropping/acquiring for
> cases where we don't need it.

Hello Jens,

This looks fine to me. I will update the patch.

Bart.=