On Wed, Sep 13, 2023 at 08:10:09AM -0300, Christoph Hellwig <[email protected]> wrote:
> Split the kernfs_kill_sb helper into helpers for the new split
> shutdown_sb and free_sb methods. Note that resctrl has very odd
> locking in ->kill_sb, so this commit only releases the locking
> acquired in rdt_shutdown_sb in rdt_free_sb. This is not very good
> code and relies on ->shutdown_sb and ->free_sb to always be called
> in pairs, which it currently is. The next commit will try to clean
> this up.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---
> arch/x86/kernel/cpu/resctrl/rdtgroup.c | 12 +++++++++---
> fs/kernfs/mount.c | 18 ++++++++----------
> fs/sysfs/mount.c | 7 ++++---
> include/linux/kernfs.h | 5 ++---
> kernel/cgroup/cgroup.c | 10 ++++++----
> 5 files changed, 29 insertions(+), 23 deletions(-)
Reviewed-by: Michal Koutn? <[email protected]>
(Also, I didn't find a necessity to have kernfs_free_sb(sb) under
rdtgroup_mutex, so folding the following patch of the series may be fine
too.)