Re: [PATCH v5 2/2] block: cancel all throttled bios in del_gendisk()

From: Michal Koutný
Date: Fri Jan 07 2022 - 10:05:30 EST


On Fri, Dec 10, 2021 at 04:31:43PM +0800, Yu Kuai <yukuai3@xxxxxxxxxx> wrote:
> + * queue_lock is held, rcu lock is not needed here.
> + */
> + blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg)
> + tg_drain_bios(&blkg_to_tg(blkg)->service_queue);

FTR, I acknowledge this can work due to RCU peculiarities, however, I
don't understand why is it preferred against more robust explict
rcu_read_lock().

(All in all, this isn't a deal breaker and I'm not confident evaluating
the rest of the patch.)

Michal