diff options
| author | Eric Sandeen <sandeen@redhat.com> | 2026-11-13 18:59:24 -0600 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-11-16 11:26:09 +0100 |
| commit | 765db499ad5837365b445b26b6fc81f30f134758 (patch) | |
| tree | dad5d3d0e75904f379de3e8a5e1e0da91efa755e /tools/perf/scripts/python | |
| parent | 5c7da17f904da61c6912ae719e8f3c3eb353ee88 (diff) | |
xfs: properly order xfsstats proc/sysfs init and teardown
The xfs statistics are accessible both through procfs and through
sysctls, so they need to be fully set up before exposure via those
interfaces, and those interfaces both need to be torn down before
the underlying percpu structures are freed. Today we get that wrong
on both ends - we expose them through xfs_init_procfs before allocating
the percpu structures, and we free those percpu structures before
tearing down sysctls and procfs.
Fix init_xfs_fs by calling alloc_percpu(xfsstats) prior to
xfs_init_procfs(), and fix the error unwind path to reflect this, then
also move free_percpu() to after tearing down both procfs and sysctls
in exit_xfs_fs.
Reported-by: Hanxiang Xu <xuhx@hust.edu.cn>
Fixes: 80529c45ab66 ("xfs: pass xfsstats structures to handlers and macros")
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
