]> git.hungrycats.org Git - linux/commit
mm/damon/sysfs-schemes: move memcg_path_to_id() to sysfs-common
authorSeongJae Park <sj@kernel.org>
Mon, 18 May 2026 23:41:13 +0000 (16:41 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 2 Jun 2026 22:22:30 +0000 (15:22 -0700)
commitb2025ce0662b186b3158c25f7f9c25b4e6931acc
tree876da490d279bff28694a1c6a1926dccf175dbe3
parentc71f8e13462d6eab9928f579c15c0a4b16abab84
mm/damon/sysfs-schemes: move memcg_path_to_id() to sysfs-common

The next commit will need to find the memcg id from the user-passed path
to the memory cgroup, from sysfs.c.  memcg_path_to_id() is doing that, but
defined in sysfs-schemes.c as a static function.  Move the function to
sysfs-common.c and mark it as non-static, so that the next commit can
reuse the function.

Link: https://lore.kernel.org/20260518234119.97569-26-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/sysfs-common.c
mm/damon/sysfs-common.h
mm/damon/sysfs-schemes.c