Re: [PATCH v2] fs/resctrl: Fix deadlock for errors during mount

From: Luck, Tony

Date: Thu May 07 2026 - 13:52:23 EST


Reinette,

This looks promising.

I'll split out the missing call to mon_put_kn_priv(); into its own
patch before the deadlock fix.

Going to re-run the tests I did before forcing kernfs_get_tree()
to fail early without setting new_sb_created, and also late.

> +/*
> + * Temporary forward declaration for testing only. Move functions instead.
> + */
> +static void resctrl_unmount(void);
> +static void mon_put_kn_priv(void);

Question: How much are forward declarations hated? And how to handle
this?

Moving the functions around in the same patch really obscures the
actual change. Is it OK to have a patch to make the functional
change including the forward declarations. Then a separate commit
that does the re-order (where it is obvious that functions are
being picked up and moved without any code changes)?

-Tony