summaryrefslogtreecommitdiff
path: root/mm/shrinker_debug.c
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2023-04-18 11:19:05 +0100
committerAndrew Morton <akpm@linux-foundation.org>2023-04-21 14:52:03 -0700
commit2124f79de6a909630d1a62b01ecc32db9f967181 (patch)
treea2aeba729af2fdd2b2539addc07a56ab50ecf2ae /mm/shrinker_debug.c
parentf3ebdf042df4e08bab1d5f8bf1c4b959d8741c10 (diff)
mm: shrinkers: fix debugfs file permissions
The permissions for the files here are swapped as "count" is read-only and "scan" is write-only. While this doesn't really matter as these permissions don't stop the files being opened for reading/writing as appropriate, they are shown by "ls -l" and are confusing. Link: https://lkml.kernel.org/r/20230418101906.3131303-1-john@metanate.com Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/shrinker_debug.c')
-rw-r--r--mm/shrinker_debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/shrinker_debug.c b/mm/shrinker_debug.c
index fdd155fd35ed..3f83b10c5031 100644
--- a/mm/shrinker_debug.c
+++ b/mm/shrinker_debug.c
@@ -189,9 +189,9 @@ int shrinker_debugfs_add(struct shrinker *shrinker)
}
shrinker->debugfs_entry = entry;
- debugfs_create_file("count", 0220, entry, shrinker,
+ debugfs_create_file("count", 0440, entry, shrinker,
&shrinker_debugfs_count_fops);
- debugfs_create_file("scan", 0440, entry, shrinker,
+ debugfs_create_file("scan", 0220, entry, shrinker,
&shrinker_debugfs_scan_fops);
return 0;
}