Re: [PATCH v17 13/32] x86,fs/resctrl: Add an architectural hook called for each mount

From: Borislav Petkov
Date: Mon Jan 05 2026 - 14:18:38 EST


On Wed, Dec 17, 2025 at 09:21:00AM -0800, Tony Luck wrote:
> +void resctrl_arch_pre_mount(void)
> +{
> + static atomic_t only_once = ATOMIC_INIT(0);
> + int old = 0;
> +
> + if (!atomic_try_cmpxchg(&only_once, &old, 1))
> + return;
> +}

There's

#define DO_ONCE(func, ...)

Can't use that?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette