]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/page_owner: rename proc-prefixed variables for clarity
authorSong Hu <husong@kylinos.cn>
Tue, 30 Sep 2025 09:21:51 +0000 (17:21 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 15 Oct 2025 04:28:50 +0000 (21:28 -0700)
`proc_page_owner_operations` and related variables were renamed to
`page_owner_fops` to better reflect their association with `debugfs`
rather than `/proc`.  This improves code clarity and aligns with kernel
naming conventions.

Link: https://lkml.kernel.org/r/20250930092153.843109-1-husong@kylinos.cn
Signed-off-by: Song Hu <husong@kylinos.cn>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Ye Liu <liuye@kylinos.cn>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_owner.c

index 9c67bb8fb1d9d3990d6457b322fc01a28443099b..8ebc2de1c110981fd56c9fae7052c19367e53b76 100644 (file)
@@ -860,7 +860,7 @@ static void init_early_allocated_pages(void)
                init_zones_in_node(pgdat);
 }
 
-static const struct file_operations proc_page_owner_operations = {
+static const struct file_operations page_owner_fops = {
        .read           = read_page_owner,
        .llseek         = lseek_page_owner,
 };
@@ -961,7 +961,7 @@ static int page_owner_stack_open(struct inode *inode, struct file *file)
        return ret;
 }
 
-static const struct file_operations page_owner_stack_operations = {
+static const struct file_operations page_owner_stack_fops = {
        .open           = page_owner_stack_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
@@ -980,7 +980,7 @@ static int page_owner_threshold_set(void *data, u64 val)
        return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(proc_page_owner_threshold, &page_owner_threshold_get,
+DEFINE_SIMPLE_ATTRIBUTE(page_owner_threshold_fops, &page_owner_threshold_get,
                        &page_owner_threshold_set, "%llu");
 
 
@@ -993,24 +993,22 @@ static int __init pageowner_init(void)
                return 0;
        }
 
-       debugfs_create_file("page_owner", 0400, NULL, NULL,
-                           &proc_page_owner_operations);
+       debugfs_create_file("page_owner", 0400, NULL, NULL, &page_owner_fops);
        dir = debugfs_create_dir("page_owner_stacks", NULL);
        debugfs_create_file("show_stacks", 0400, dir,
                            (void *)(STACK_PRINT_FLAG_STACK |
                                     STACK_PRINT_FLAG_PAGES),
-                           &page_owner_stack_operations);
+                            &page_owner_stack_fops);
        debugfs_create_file("show_handles", 0400, dir,
                            (void *)(STACK_PRINT_FLAG_HANDLE |
                                     STACK_PRINT_FLAG_PAGES),
-                           &page_owner_stack_operations);
+                           &page_owner_stack_fops);
        debugfs_create_file("show_stacks_handles", 0400, dir,
                            (void *)(STACK_PRINT_FLAG_STACK |
                                     STACK_PRINT_FLAG_HANDLE),
-                           &page_owner_stack_operations);
+                           &page_owner_stack_fops);
        debugfs_create_file("count_threshold", 0600, dir, NULL,
-                           &proc_page_owner_threshold);
-
+                           &page_owner_threshold_fops);
        return 0;
 }
 late_initcall(pageowner_init)