mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
mm/damon/sysfs: split out filters setup function
damon_sysfs_set_probe() is doing not only probe setup but also filters setup. Split out filters setup for readability. Link: https://lore.kernel.org/20260630141726.92246-11-sj@kernel.org Signed-off-by: SJ Park <sj@kernel.org> Cc: Brendan Higgins <brendan.higgins@linux.dev> 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: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
8c02207a06
commit
ea0e5f5786
|
|
@ -1909,16 +1909,11 @@ static int damon_sysfs_set_attrs(struct damon_ctx *ctx,
|
|||
return damon_set_attrs(ctx, &attrs);
|
||||
}
|
||||
|
||||
static int damon_sysfs_set_probe(struct damon_probe *probe,
|
||||
struct damon_sysfs_probe *sys_probe)
|
||||
static int damon_sysfs_set_filters(struct damon_probe *probe,
|
||||
struct damon_sysfs_filters *sys_filters)
|
||||
{
|
||||
struct damon_sysfs_filters *sys_filters;
|
||||
int i;
|
||||
|
||||
sys_filters = sys_probe->filters;
|
||||
if (!sys_filters)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < sys_filters->nr; i++) {
|
||||
struct damon_sysfs_filter *sys_filter =
|
||||
sys_filters->filters_arr[i];
|
||||
|
|
@ -1945,6 +1940,17 @@ static int damon_sysfs_set_probe(struct damon_probe *probe,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int damon_sysfs_set_probe(struct damon_probe *probe,
|
||||
struct damon_sysfs_probe *sys_probe)
|
||||
{
|
||||
struct damon_sysfs_filters *sys_filters;
|
||||
|
||||
sys_filters = sys_probe->filters;
|
||||
if (!sys_filters)
|
||||
return 0;
|
||||
return damon_sysfs_set_filters(probe, sys_filters);
|
||||
}
|
||||
|
||||
static int damon_sysfs_set_probes(struct damon_ctx *ctx,
|
||||
struct damon_sysfs_probes *sys_probes)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user