Re: [PATCH] cleanup: clarify scope-based resource management and goto guidance

From: Peter Zijlstra

Date: Thu Nov 26 2026 - 04:50:13 EST


On Thu, Nov 26, 2026 at 05:29:33AM +0100, Przemek Kitszel wrote:

> > Then undo_pre_bar() is inside guard(); and that is very much not the
> > intention. The same will be true with ACQUIRE();
>
> ah, I see :(
>
> would it be fine to relax the doc and stop discouraging against
> scoped_guard() and goto in the same function (but keep the "don't jump
> into/out of its scope")?

So I don't really understand the problem we're trying to solve here. Is
this really about AI being stupid? Just wait a few months, I'll catch up
or something.