]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mm/damon/sysfs: move sysfs_lock to common module
authorSeongJae Park <sj@kernel.org>
Wed, 26 Oct 2022 22:59:38 +0000 (22:59 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 30 Nov 2022 23:01:25 +0000 (15:01 -0800)
commit39240595917ec0c4f71d7b9dd7909790715968b5
tree9e5bc81859c5a0fba6b1e8ddd6e5897719dbef6d
parent1f71981408ef5696ad8544f282d336d4fc60a807
mm/damon/sysfs: move sysfs_lock to common module

DAMON sysfs interface is implemented in a single file, sysfs.c, which has
about 2,800 lines of code.  As the interface is hierarchical and some of
the code can be reused by different hierarchies, it would make more sense
to split out the implementation into common parts and different parts in
multiple files.  As the beginning of the work, create files for common
code and move the global mutex for directories modifications protection
into the new file.

Link: https://lkml.kernel.org/r/20221026225943.100429-8-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/Makefile
mm/damon/sysfs-common.c [new file with mode: 0644]
mm/damon/sysfs-common.h [new file with mode: 0644]
mm/damon/sysfs.c