On Sun, Sep 13, 2026 at 06:59:25PM +0530, Nilay Shroff wrote:
quoted
+ /* as long as there are pending bios, @blkcg can't go away */
+ {
+ guard(spinlock)(&blkcg->async_bio_lock);
+ bio_list_merge_init(&bios, &blkcg->async_bios);
+ }
Instead of using guard(spinlock)(...) here, I think we could use the
simpler spin_lock()/spin_unlock() helpers. IMO, they are easier
to read and reason about for these short critical sections.
Yes, guard() is a complete mess that makes code unreadable, please
don't use it. scope_guard is a bit better, but given that it doesn't
mix with goto based unwdinding it still is too dangerous to actually
use.